Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Sep 1st, 2005, 4:48 AM   #1
z0en
Newbie
 
Join Date: Sep 2005
Posts: 3
Rep Power: 0 z0en is on a distinguished road
Winsock IRC bot errors

Hi,

I am currently trying to code a IRC socket on Windows using winsock.h

warning C4013: 'snprintf' undefined; assuming extern returning int
warning C4101: 'h' : unreferenced local variable
Linking...
main.obj : error LNK2001: unresolved external symbol _snprintf
Debug/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

main.exe - 2 error(s), 2 warning(s)

First warning line: snprintf(pong, sizeof(pong), "PONG :%s", pingpong+strlen("pong :"));
Second warning line: struct hostent *h;

I used snprintf on Linux for the same thing, Doesn't seem to work on Windows (Or am i doing something wrong?)

Any help would be appreciated, Thanks..
z0en is offline   Reply With Quote
Old Sep 1st, 2005, 5:36 AM   #2
z0en
Newbie
 
Join Date: Sep 2005
Posts: 3
Rep Power: 0 z0en is on a distinguished road
Problem solved, Thanks anyway.
z0en is offline   Reply With Quote
Old Sep 1st, 2005, 10:41 AM   #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
What was the solution?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 5th, 2005, 9:47 PM   #4
z0en
Newbie
 
Join Date: Sep 2005
Posts: 3
Rep Power: 0 z0en is on a distinguished road
sprintf(pong, "PONG :%s", pingpong+strlen("pong :"));

struct sockaddr_in target;

Just a touch different from Linux, As that's what im used too..

Work's well now..
z0en 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 2:26 PM.

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