Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 5 months ago. This question has been closed. Reason: solved
Subdirectories when compiling with GCC arm embedded
Hello all,
I am no compiler guru and would like some assistance for the issue I have.
It builds led blink fine, but when I have dependancies in different directories, the compiler can't find it. For example when I build http://mbed.org/handbook/SDFileSystem it returns:
I am using GNU tools ARM Embedded 4.7q4 for windows, the target device is a LPC1768. The command I use to compile is the following:
arm-none-eabi-g++ -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -DNDEBUG -std=gnu++98 -I./mbed -I./mbed/LPC1768 -I./mbed/LPC1768/GCC_ARM -o main.o main.cpp arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Tmbed/LPC1768/GCC_ARM/LPC1768.ld -L./mbed -L./mbed/LPC1768 -L./mbed/LPC1768/GCC_ARM -o my_program.elf main.o mbed/LPC1768/GCC_ARM/startup_LPC17xx.o mbed/LPC1768/GCC_ARM/core_cm3.o mbed/LPC1768/GCC_ARM/system_LPC17xx.o mbed/LPC1768/GCC_ARM/cmsis_nvic.o -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys arm-none-eabi-objcopy -O binary my_program.elf my_program.bin
How do I tell the compiler that it should look in the subdirectory's of the current directory?
Thank you for your time,
Daisuke