Cannot link c-project sources
Joachim
nuklear at singnet.com.sg
Wed Mar 1 07:13:09 GMT 2000
Hi There!
I'm a beginner with Linux programming and using kdevelop.
When trying to make my C program which consists of several source-files
I get the following errors:
../path/main.c:line#: undefined reference to 'function'
collect2: ld returned 1 exit status
gmake[1]:***[myprogram] Error 1
gmake: ***[all-recursive] Error 1
***failed***
Every source file is without warnings and errors when compiled
individually.
And I'm sure though that my C syntax is correct.
Every source file other than main.c represents an individual function
accessed by main().
As I said, everything is correctly prototyped in main(), etc... but it
looks like kdevelop
can only see my main.c which it compiles, but is unable to find any of
the other source files, representing
the various "undefined references."
All the source file are also located in the same directory as main.c
Here are my settings:
From: Options --> Kdevelop_Setup --> General --> Make command = gmake
From: Project --> Options --> Compiler Options --> additional options =
-D_GNU_SOURCE (everything else default)
From: Project --> Options --> Linker Options --> additional flags [nil]
From: Project --> Options --> Linker Options --> additonal Libraries =
-lslang
From: Project --> Options --> Make options --> all default (nil)
Any glues to what I'm doing wrong here?
Thanks a billion!
Joachim
More information about the KDevelop
mailing list