On 29.05.2012 18:19, belahcene wrote: > Hi, > I am newer to windows environnement, I install mingw to cretae executable > for application cretaed under linux. ( written in c). > My application is just a client/server program ( I replaced the linux > included by windows include, namely > > I used #include<winsock2.h> > > The compilation is done without error, but when I tryed to link it I got > errors : > WSAGet.. , WSACleanup .... > I tryed option -lwinsock, -lwinsock2 , and other and other but no one > has been succeded!!!
There are a few other slight differences between Linux (BSD) sockets and Windows sockets, but for a start, it should almost work. The lib to link with on Windows would be -lws2_32 (winsock2). > An,other problem: > I created a graphical interface with fltk on linux, i compile it and lined > it without error, but when I tryied to run it on windows I got errors > like cannot find libstdc++-6.dll and others a lot. > > I conclude that I need to compile it with static library, in oder to use it > on any windows machien!!!!! Am I right ?? > how to do it Yes, you either must link the program with static versions of libstdc++ and maybe a few others, or you can redistribute these few dll's w/o license problems (there are explicit exceptions for these dll's). Static linking (under MinGW) can be done if you define LDFLAGS like this when you configure FLTK: LDFLAGS="-static-libgcc -static-libstdc++" \ ./configure <... further options> If you do it this way, `fltk-config --ldflags' will also return these flags for your later builds. If there are other undefined symbols or problems, please post (parts of the) real error messages, so that we can see what is missing. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

