Problem in compilng C code question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux