Results 1 to 2 of 2
Hi
I have been trying to build a file called main.cpp through my make file which is in Linux. There are functions like
CoreBegin()
Begin()
CoreEnd()
Init_s32()
init_end() etc.,
which ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-11-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 1
Undefined Reference to "Function' error
Hi
I have been trying to build a file called main.cpp through my make file which is in Linux. There are functions like
CoreBegin()
Begin()
CoreEnd()
Init_s32()
init_end() etc.,
which are being called. I have included all the necessary headers and also have included the necessary lib.a files in the make file as below:
LIBS = ../../Core/Lib/lib_core.a ../../EOS/Lib/libeosext.a ../../KWP/Lib/kis1976.a ../../PLS/Lib/LIBP.a
I am still getting the below error. I use make -j makefile.mak clean all command to make the build. I have been trying to solve this since a week. Can somebody pls help. Thanks.
.a ../../EOS/Lib/libeosext.a ../../KWP/Lib/kwp_tc1796.a ../../PLS/Lib/LIBPXMJTAG.a -Wl,--end-group -mcpu=tc1796 -nostart
es -Wl,-Map,../Output/training.map -relax -Wl,--pcpmap -lpxmonrt -lpxdbg -lm
main.o: In function `_main()':
main.o(.main+0x1ce): undefined reference to `CoreBegin()'
main.o(.main+0x1d2): undefined reference to `Begin()'
main.o(.main+0x1d6): undefined reference to `CoreEnd()'
main.o(.main+0x1da): undefined reference to `Init_s32()'
main.o(.main+0x1de): undefined reference to `init_end()'
main.o(.main+0x21e): undefined reference to
make: *** [../Output/training.elf] Error 1
- 11-13-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
FYI, we aren't supposed to help you with school projects, and since you are obviously very unfamiliar with makefiles and Linux compiler rules, I have to assume that you are doing this for a class?Code:all: gcc -o myprog main.cpp -L ../../EOS/Lib -L ../../KWP/Lib -L \ ../../PLS/Lib -l _core -l eosext -l kis1976 -l LIBP
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
