Elemental
Well-Known Member
try this...
effectively swapping the order of main.cpp and NMEA_SocketCAN.cpp
because the other 'library' isn't a 'library' you may find the order is important. Absolutely for certain the symbols from SocketCAN aren't present when the linker tries to resolve references ion main.cpp.
Update: It's a while since I used c++ so I checked. http://lampwww.epfl.ch/~fsalvi/docs/gcc/www.network-theory.co.uk/docs/gccintro/gccintro_14.html and https://stackoverflow.com/questions/11893996/why-does-the-order-of-l-option-in-gcc-matter confirm the linker is single pass
Code:
g++ -Wall -o main.o/home/pi/developer/NMEA2000_socketCAN/NMEA2000_SocketCAN.cpp main.cpp -I/home/pi/developer/NMEA2000/src/ -I/home/pi/developer/NMEA2000_socketCAN -L/home/pi/developer/NMEA2000/src/ -lnmea2000
effectively swapping the order of main.cpp and NMEA_SocketCAN.cpp
because the other 'library' isn't a 'library' you may find the order is important. Absolutely for certain the symbols from SocketCAN aren't present when the linker tries to resolve references ion main.cpp.
Update: It's a while since I used c++ so I checked. http://lampwww.epfl.ch/~fsalvi/docs/gcc/www.network-theory.co.uk/docs/gccintro/gccintro_14.html and https://stackoverflow.com/questions/11893996/why-does-the-order-of-l-option-in-gcc-matter confirm the linker is single pass
Last edited: