make: *** No rule to make target

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi folks - total newb to this stuff, apology in advance if this has been answered before, but I couldn't find anything that led me to a solution. Trying to build my 1st project in Atmel Studio 6.2.993 Beta. I have 2 projects in the solution - one called "core" and one called "Color_Mix_2". "core" includes a library file called "libcore.a".

When I try to build, libcore.a gets built just fine

Quote:
Finished building target: libcore.a Done executing task "RunCompilerTask".

But then, when it tries to build "Color_Mix_2", it barfs -
Quote:
make: *** No rule to make target `../core/Debug/libcore.a', needed by Color_Mix_2.elf'. Stop.
Done executing task "RunCompilerTask" -- FAILED.
.

The weird thing is that, in the navigator window in Studio, I can see that "libcore.a" is shown as an output file in project "core", and NOT shown in project "Color_Mix_2". So I ask - why is the compiler wanting to build "libcore.a" AGAIN, after it just succeeded?

I found the makefile that Studio generated, but it looks like an empty little toy template, rather than the makefiles I've seen elsewhere. Should I post it? I looked at gcc help, it ALMOST helps me, but not quite...

Grateful for any tips and help, paul

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's surely a linker INPUT to the second project and the message is basically saying it cannot be found. Is -L used to tell the linker where to look? How about posting the entire build dialog?

BTW as you are clearly trying to build Arduino code have you explored the Arduino add on in the extension gallery, while I haven't used it I assume the intention is that it builds without needing to create libcore.a separately.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow, mucho thanko for the prompt reply, clawson! I checked out the Studio extensions - interesting, it finds the Visual Micro IDE called "the Arduino IDE fo Atmel Studio". I have NOT tried that, will check it out.

I DON'T find a -L option in the build output. Here's what it spewed forth (skipping a lot of preliminary stuff building core.a):

Quote:
USBCore.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o
C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-ar.exe: creating libcore.a
Finished building target: libcore.a
Done executing task "RunCompilerTask".
Task "RunOutputFileVerifyTask"
Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "core.cppproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Avr.common.targets" from project "C:\Users\paul\Documents\Atmel Studio\6.2\Color_Mix_2\core\core.cppproj" (entry point):
Done building target "Build" in project "core.cppproj".
Done building project "core.cppproj".

Build succeeded.
------ Build started: Project: Color_Mix_2, Configuration: Debug AVR ------
Build started.
Project "Color_Mix_2.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Compiler.targets" from project "C:\Users\paul\Documents\Atmel Studio\6.2\Color_Mix_2\Color_Mix_2\Color_Mix_2.cppproj" (target "Build" depends on it):
Task "RunCompilerTask"
Shell Utils Path C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils
C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils\make.exe all
Building file: .././Color_Mix_2.cpp
Invoking: AVR8/GNU C Compiler : 4.8.1
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-g++.exe" -DF_CPU=16000000L -DARDUINO=103 -I".\..\core" -I".\..\core\Debug" -I"../../../../ArduinoCore" -Os -fdata-sections -ffunction-sections -g1 -Wall -mmcu=atmega328p -c -fno-exceptions -print-search-dirs -v -MD -MP -MF "Color_Mix_2.d" -MT"Color_Mix_2.d" -MT"Color_Mix_2.o" -o "Color_Mix_2.o" ".././Color_Mix_2.cpp"
install: c:\program files (x86)\atmel\atmel toolchain\avr8 gcc\native\3.4.1051\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.8.1/
programs: =c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../libexec/gcc/avr/4.8.1/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../libexec/gcc/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/avr/4.8.1/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/
libraries: =c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/avr5/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr5/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/avr/4.8.1/avr5/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/avr5/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/avr/4.8.1/;c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.1051/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/
Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-g++.exe
Finished building: .././Color_Mix_2.cpp
make: *** No rule to make target `../core/Debug/libcore.a', needed by `Color_Mix_2.elf'. Stop.
Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "Color_Mix_2.cppproj" -- FAILED.
Done building project "Color_Mix_2.cppproj" -- FAILED.

Build FAILED.
========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========


Maybe in the Studio IDE Toolchain options under Miscellaneous I should add the -L. Will try this. Thank y'all for your collective patience with newbs!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You cut off too much from the front of that. The whole point was that I wanted to see where it WAS building libcore.a.