Problem in compilng C code question
Fri Apr 15 01:45:00 GMT 2005
Im trying to compile a program written in C( OS: Mandrake Linux 10.1). Ive got gcc-3.4.1 compiler installed.
Im getting following errors.
Im compiling my application in following way.
gcc g MyApp.c o myapp L/usr/local/lib lpcsclite lpthread I.
/root/tmp/ccMDthVo.o(.text+0x4b): In function `FunctionName':
/mnt/Linux/Linux/PCEasyLinux_TestApp.c:66: undefined reference to `someFunction'
/root/tmp/ccMDthVo.o(.text+0xc1):/mnt/Linux/Linux/MyApp.c:91: undefined reference to ` someFunction '
/root/tmp/ccMDthVo.o(.text+0xc6):/mnt/Linux/Linux/ MyApp.c:92: undefined reference to ` someFunction '
/root/tmp/ccMDthVo.o(.text+0xcb):/mnt/Linux/Linux/ MyApp.c:97: undefined reference to ` someFunction '
collect2: ld returned 1 exit status
When I search in the google, I found out that the problem could be with the compiler options or with the path variables may not
Contain that path to the shared libraries
The CPATH variable contains the path to all the required header files.
Ive also got LD_LIBRARY_PATH that contains the path to the required shared libraries. ( both .a and .so files)
All the functions that are listed in the error messages are declared and defined in various files in the same directory.
What could be the problem and how I can solve this problem?
Kindly let me know.
More information about the Gcc-help