Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 20th, 2006, 1:30 PM   #1
hbe02
Hobbyist Programmer
 
hbe02's Avatar
 
Join Date: Mar 2006
Location: Lebanon
Posts: 148
Rep Power: 3 hbe02 is on a distinguished road
Hello Sockets

Today im starting with sockets programming. im learning how to write a simple UDP client server program. so im compiling some functions which are fine but linking is the problem. apparently i have to:
Quote:
When you compile this files, make sure you link them against Ws2_32.lib.
so how do i do that? and can someone give me a little more info about why it is important to open the windows connection using WSAstartup? would this be different on other operating systems?
Thanks y'all
hbe02 is offline   Reply With Quote
Old May 20th, 2006, 2:06 PM   #2
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Which compiler are you using?
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old May 20th, 2006, 2:10 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
It's different for different compilers and IDEs. What're you using?

EDIT: damnit, MJ!
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old May 20th, 2006, 2:27 PM   #4
hbe02
Hobbyist Programmer
 
hbe02's Avatar
 
Join Date: Mar 2006
Location: Lebanon
Posts: 148
Rep Power: 3 hbe02 is on a distinguished road
Im using Microsoft visual C++ 6.0
hbe02 is offline   Reply With Quote
Old May 20th, 2006, 5:06 PM   #5
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Quote:
Originally Posted by Ooble
EDIT: damnit, MJ!
I win! :p

And I believe Ooble hit it on the money, though I have not used VC++ in a while.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old May 20th, 2006, 6:58 PM   #6
hbe02
Hobbyist Programmer
 
hbe02's Avatar
 
Join Date: Mar 2006
Location: Lebanon
Posts: 148
Rep Power: 3 hbe02 is on a distinguished road
That worked just fine thanks for the feedback ooble
hbe02 is offline   Reply With Quote
Old May 20th, 2006, 2:57 PM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Right. If I recall correctly, you need to track down the .lib file you need, and just drag it onto the project name in the project manager of the VC window.

I'd also recommend checking out Visual C++ 2005 (8.0): http://msdn.microsoft.com/vstudio/express/ .
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old May 21st, 2006, 7:34 AM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Glad to hear it. If you ever get around to checking out VC 2005, let us know how it goes.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:06 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC