god this is ........in me off

This is a discussion on god this is ........in me off within the C++ Programming forums, part of the General Programming Boards category; Code: #include <windows.h> int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev, LPSTR args, int show) { WSADATA info; WSAStartup(MAKEWORD(1,1), &info); return 0; ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    206

    god this is ........in me off

    Code:
    #include <windows.h>
    
    int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev, LPSTR args, int show)
    {
    	WSADATA info;
    	WSAStartup(MAKEWORD(1,1), &info);
    
    	return 0;
    }
    i made it under a normal application project on VC++4.0. It gives me an unresolved external link with WSAStartup (_WSAStartup@8). WTF? sum1 help me plz its makin me mad

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    i dont use the win32api and i dont plan on using it, but from here, it looks like youre not linking something. also, watch the language .

  3. #3
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Originally posted by Denthor2000
    sum1 help me plz its makin me mad
    Straight out of MSDN....

    QuickInfo
    Windows NT: Yes
    Windows: Yes
    Windows CE: Use version 1.0 and later.
    Header: Declared in winsock2.h.
    Import Library: Link with ws2_32.lib.

    Maybe you should read the help file before you get so upset next time.
    Last edited by jdinger; 06-05-2002 at 07:05 PM.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    > sum1 help me plz its makin me mad
    wrong person.

  5. #5
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Sorry, Flikm! I corrected it manually.

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    206
    Originally posted by jdinger


    Straight out of MSDN....

    QuickInfo
    Windows NT: Yes
    Windows: Yes
    Windows CE: Use version 1.0 and later.
    Header: Declared in winsock2.h.
    Import Library: Link with ws2_32.lib.

    Maybe you should read the help file before you get so upset next time.
    Code:
    #include <windows.h>
    #include <ws2_32.lib>
    
    int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev, LPSTR args, int show)
    {
    	WSADATA info;
    	WSAStartup(MAKEWORD(1,1), &info);
    
    	return 0;
    }
    says i dont have permission

  7. #7
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    you don't use #include statements to link libraries. I don't use VC++, but there should be somewhere that says "Linker Options" put in the library there.

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    or use:
    #pragma comment( lib, "ws2_32.lib" ); but linking it is preferred.

  9. #9
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    geez!

    go into your project settings and add it to the link libraries....
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what race is god?
    By Leeman_s in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 02-22-2004, 05:38 PM
  2. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM
  3. GOD and religion
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 10-14-2001, 06:13 PM
  4. Foundations
    By mithrandir in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 10-05-2001, 03:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21