This is the mail archive of the mailing list for the GCC 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]

Easy linker problem

I want to use function 'sleep' in a program.

When I compile my test prog with < gcc sleepTest.c -o sleepTest
-mno-cygwin >

I get:
$ gcc sleepTest.c -o sleepTest -mno-cygwin
 undefined reference to `_sleep'
collect2: ld returned 1 exit status

Do I need a -lxxxxxx.a in the compile statement for the linker?
If so:
- how do I know which lib to use an a given situation, is there a
reference out there somewhere??
- have I buggered up my lib paths, shouldn't this stuff be found


"This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential,  may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]