This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello,You are missing a definition of num. All you have now is just a declaration.
I am in working on porting some code to cygwin but I am stuck. I need it to be compiled as a dll but gcc gives me a linking error.
This code triggers the error:
extern int num;
int foo() { extern int num; num = 5; }
the error is:
hello.c:(.text+0x5): undefined reference to `_num'
And this is how I call gcc: "gcc -shared hello.c"
Interestingly, the code above does work on my ubuntu installation (ubuntu 7.10 gcc 4.1.3)
Any help is appreciated
Regards Fernando
-- VH
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |