This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problem in compilng C code question
- From: "Naveen Mukkelli" <Naveen at worldsmart dot com dot au>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 15 Apr 2005 11:16:09 +0930
- Subject: Problem in compilng C code question
Hi,
I?m trying to compile a program written in ?C?( OS: Mandrake Linux 10.1). I?ve got ?gcc-3.4.1? compiler installed.
I?m getting following errors.
I?m 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.
I?ve 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.
Cheers,
Naveen