Dear Sir or Madame
If I construct a Pic project and save this and some source fiels into the same directory, let say "/home/stefan/Projekt/Test2"
everything looks fine, however if I "add" another C source file from another directory, let say "/home/stefan/Projekt/Lib"
but without copy the source file to Test2 directory then I encounter problems when building.
I am using the "Small Device C Compiler" toolchain
The compiler seems to be acting correct, it finds all .C fiels, even the one in the Lib directory, compile them and place the
.o file into the Test4 directory.
But the linker seems to got it wrong becosue it tries to find the .o file in the LIB directory when linking,
Example of compiler row
sdcc -mpic14 -p16f690 -V --debug -I/home/stefan/Projekt/Test2/ -I/home/stefan/Projekt/inc/ -c /home/stefan/Projekt/Lib/SystemClock.c
This place the SystemClock.o file in the Test2 direcotry
Example of linker line
sdcc -mpic14 -p16f690 -V --debug -Wl-c -Wl-m -I/home/stefan/Projekt/Test2/ -I/home/stefan/Projekt/Test2/ -oTest2.hex Test2.o Timer1.o /home/stefan/Projekt/Lib/SystemClock.o
Log in to post a comment.