|
|
|
|
![]() ![]() |
Jan 11 2008, 02:42 PM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 1 Joined: 11-January 08 Member No.: 27,536 |
Hello
I am writing small routine that should resolve URL. Using Solaris 8 box and gcc. I nedd to use 'gethostbyname()' function but after linking, I receive message with linking error. Does anyone knows which libraries I should include and which gcc option should be used for compiling? |
|
|
|
Jan 17 2008, 04:00 PM
Post
#2
|
|
|
Way Out Of Control - You need a life :) Group: [MODERATOR] Posts: 1,886 Joined: 16-August 05 Member No.: 7,896 |
seems to be the same problem as here : http://gcc.gnu.org/ml/gcc-bugs/2002-07/msg00196.html
This guy solved his problem by using "cc" instead of gcc. |
|
|
|
Jan 17 2008, 04:57 PM
Post
#3
|
|
|
Premium Member Group: [HOSTED] Posts: 393 Joined: 9-March 07 From: Tucson, AZ Member No.: 20,794 |
I never had this problem with gethostbyname, though the last time I coded on Slowaris was using gcc 2.95 and gcc 3.1...so, if you're using a newer version of GCC I can't really speak for why it doesn't work.
What linker options are you passing to GCC to compile it? Sounds a little bit like the linker is resolving the wrong library and linking it. I can see problems happening when you link a non-gnu library and expect it to behave like it's gnu counterpart. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th July 2008 - 08:09 AM |