Skip to content
Advertisement

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

So here is the link : http://www1.cmc.edu/pages/faculty/alee/g++/g++.html

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.

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement