Katatana Katatana - 1 year ago 74
C++ Question

Does downloading g++ to windows guarantee you will compile Unix projects successfully?

So here is the link :

My Unix project uses this :

#include <unistd.h>
#include <curses.h>

Is it a guarantee? I heard that you can compile the Unix projects using g++ (I have makefile too). I am only familiar about Windows and I don't know anything about Linux and Mac.

Answer Source

No guarantee. I'm close to say: "impossible, except for very simple code". Simple code: calculations, input/output to the console, simple file operations. Not simple code: anything you ask the OS to do, specially related to windows and messages. And special OS-dependant headers.

g++ is the compiler from GNU. Its main use is in Linux. There are a few (but popular) "adaptations" in order to use it in Windows: cygwin, MinGW, etc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download