how would i compile something on linux but so it can run on windows.
it's not complicated. the code compiles on both windows and linux. but if i compile it only linux and run it on windows i get this error "The NTVDM has encountered an illegal instruction. CS:054f ..."
=D this is how i compile it. i think this is where the problem is. but i am a noob
$ g++ -o file.exe file1.cpp file2.cpp
if i do ./file.exe
it works just fine. on linux. but cant run it on windows.
Just putting a .exe on the file does NOT make it a valid Windows/DOS executable. You'll have to either A) compile the code on a Windows box or B) use gcc to compile the source into a Windows binary as the "Cross Compiling" section in this article instructs. 8)
oh i knew that. i just thought it'd help it read it =D
what i didnt know is that it compiles different on linux =)
thanks a lot
ah cross compiling's too hard for me right now =D