// JP opened flex table

Click to See Complete Forum and Search --> : Socket program: Linking error with WSAStartup


Zulfi Khan2
February 27th, 2004, 12:56 AM
I have downloaded a socket prog & I am trying to use its code in a dlg based application but I am getting following linking error:

Linking...
ServerPGDlg.obj : error LNK2001: unresolved external symbol _WSAStartup@8
Debug/ServerPG.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


I have included following files:
#include "stdafx.h"
#include "ServerPG.h"
#include "ServerPGDlg.h"
#include <windows.h>
#include <winsock.h>
#include <stdio.h>

in my *dlg.cpp file. I am calling WSAStartup in my initDialog method:

Looking for a reply in this regard.

Zulfi.

Ejaz
February 27th, 2004, 01:26 AM
make sure that u have ws2_32.lib added in ur project setting.

Zulfi Khan2
February 27th, 2004, 02:46 AM
Thanks. It orked.

Zulfi.

Andreas Masur
February 27th, 2004, 04:41 AM
[Moved thread]

//JP added flex table