turning .cpp to an executable exe file for windows and an executable file in linux

after you build your file (using Code::Blocks or Netbeans) how do you turn it into an executable exe file and an executable file for linux?
Last edited on
linux doesnt use executable file structure - that is about as much help as i can give, however unless you are compiling from the terminal you should easily be able to press that green play button on the IDE and it should do all the necessary work for you, and run your program.

I have used linux to compile some of my c++ projects for a few weeks now, Also using code blocks and have never run into any trouble (Unless accidentally using windows code :) )
Last edited on
linux doesnt use executable file structure

It does, it uses the ELF format.

To build your program for several operating systems, you have to compile it with an appropriate compiler for each platform, like g++ for Linux and the MinGW port of g++ for Windows.
he sais hes using codeblocks which uses MinGW which is fine for Linux - also offtopic but from my understanding it runs programs in a completely different manner using many archive files and based on depency. You seem confident so i wont argue but thats what i thought. i did look up ELF so i guess youre correct
It does, it uses the ELF format.


silly user!
elves arnt a format!
using many archive files and based on depency

Are you perhaps thinking of static libraries? They're indeed nothing more than archives containing object files.

he sais hes using codeblocks which uses MinGW which is fine for Linux

It only uses MinGW on Windows by default, since MinGW creates executables for Windows. On Linux, the native version of g++ is used (however, you can make Code::Blocks use MinGW too for purposes of cross-compiling).

silly user!
elves arnt a format!

It makes sense when you say it like that. or does it?
Last edited on
Topic archived. No new replies allowed.