bm_mne 0 Report post Posted January 11, 2008 HelloI 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? Share this post Link to post Share on other sites
yordan 10 Report post Posted January 17, 2008 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. Share this post Link to post Share on other sites
ethergeek 0 Report post Posted January 17, 2008 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. Share this post Link to post Share on other sites