Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Solaris Gethostbyname, dns resolving
bm_mne
post Jan 11 2008, 02:42 PM
Post #1


Newbie [ Level 1 ]
Group Icon

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?

Go to the top of the page
 
+Quote Post
yordan
post Jan 17 2008, 04:00 PM
Post #2


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,969
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.
Go to the top of the page
 
+Quote Post
ethergeek
post Jan 17 2008, 04:57 PM
Post #3


Premium Member
Group Icon

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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Someone from the Sun?(18)
  2. Debian 3.1 Or Solaris 10(5)
  3. DNS Server On Solaris 10(2)
  4. Port Status(2)
  5. Suggest Books/tutorials For Solaris 10 Beginner(2)
  6. Whats A Good Graphics Editor For Solaris 10 ?(8)
  7. Named In Solaris(1)
  8. Shmmni, Shmseg, Shmmax : How To Know The Current Value On Solaris ?(3)
  9. Need Help Configuring The BIND DNS Server(7)
  10. Basic Setup For Apache In Solaris 10(1)
  11. Request For Subforum - Solaris(3)
  12. Why Solaris Is Different To Other Unix?(9)
  13. How Do I Install Solaris?(5)


 



- Lo-Fi Version Time is now: 21st August 2008 - 10:42 PM