Hi,
I am having problem in win32 GUI project (Code::Blocks 8.02 release).
everything was fine before i started winsock part of it.
As I am targeting very low end systems (windows NT having a minimal RAM), I used windows API's in my project and successfully generated the image. This was the good first part.
Second part :
I need to listen on a local port and based on the data received...write the business logic.
On WM_CREATE:
I started a new thread and tried to write my first Winsock program starting with
WSASTARTUP() and built it ....
I received an error stating something about wsock32.lib.
I included wsock32.lib into my project and then I am getting
"cannot find -lWSock32.Lib" error everytime I build it ...
then i removed wsock32.lib and compiled but same story....
I have tried everything...I saw one post from Yannis stating to change paramater to -lwsock32.lib but could not get that menu in my IDE.
As my first program was in C (classroom) and then jumped to c# for a long time ..this linking problem has taken my last 16 hours ...
Please help me a laymans language if you have any answer.
Code snippet of new Thread :
void Thread (PVOID pvoid)
{
volatile PPARAMS pparams ;
pparams = (PPARAMS) pvoid ;
//param struct has a handle to the parent window...
//I wrote the logical flow
//Start the socket
//put it in an infinite loop for server
//everytime data received, send message to parent window
//handle the custome message to call the appropriate function
//in case of error call _endthread();
//SendMessage (pparams->hwnd, WM_DATARECEIVED (I want to capture this message in parent), 0, 0) ;
wVersionRequested = MAKEWORD(2, 2);
WSAStartup(wVersionRequested, &wsaData);
WSACleanup();
//_endthread () ;
}
-Thanks