Hi everyone! I'm transferring my C program that I created from Linux to WindowsXP. I would like to know what I need to download/install in Windows in order to compile and successfully run the program? Also, will I need to change some parts of the source code? I used socket programming and MySQL for the C program. Thanks!
shinsengumi -10 Junior Poster in Training
Recommended Answers
Jump to PostHopefully you will not need to make very many changes to the source code. MS-Windows uses winsock instead of berkley sockets, so you might want to skim through one of the tutorials to …
Jump to PostOne way to make the cod eportable between both *nix and MS-Windows is to use preprocessor instructions, something like this:
#ifdef _WIN32_ #include <winsock2.h> #else include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <errno.h> #endif
All 7 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
shinsengumi -10 Junior Poster in Training
shinsengumi -10 Junior Poster in Training
MosaicFuneral 812 Nearly a Posting Virtuoso
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
shinsengumi -10 Junior Poster in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.