Cannot link c-project sources

W. Tasin tasin at e-technik.fh-muenchen.de
Wed Mar 1 10:43:33 UTC 2000


Joachim wrote:
> 

Hi Joachim,

> 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.

this means there is no variable "function" found in all your sources...

It isn't much information you appear in this mail but it sounds like the
following:

---
int function()
{

  ......
  return x;
}

int main()
{

  y=function;
           ^^^^ --- and it should be y=function() instead...
}

----
Simply a typo... inside main.c

Bye

Walter


--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,
FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>




More information about the KDevelop mailing list