Nov 22, 2009

Solaris Gethostbyname - dns resolving

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Operating Systems > UNIX (Other Flavours)

Solaris Gethostbyname - dns resolving

bm_mne
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?


Comment/Reply (w/o sign-up)

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

Comment/Reply (w/o sign-up)

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

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Solaris Gethostbyname Dns Resolving


    Looking for solaris, gethostbyname, dns, resolving

See Also,

*SIMILAR VIDEOS*
Searching Video's for solaris, gethostbyname, dns, resolving
advertisement



Solaris Gethostbyname - dns resolving

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com