Hey all,
I am starting to use C++, and i made a simple 'Hello World' program. I was wondering, were is a Linux C++ compiler to compile this file?
Thanks,
Printable View
Hey all,
I am starting to use C++, and i made a simple 'Hello World' program. I was wondering, were is a Linux C++ compiler to compile this file?
Thanks,
GCC comes with every Linux distro and includes a C++ compiler that I think should meet your needs. But then, I've never written a line of code in my life and don't know the first thing about C++, so I might be totally off base on what you need. :D
A great place to read up on this is the man pages.
The gcc commpand that will compile your code is:
gcc filename.c -o outputfilename
This will invoke gcc, then to execute your new program:
./outputfilename
I hope this helps you!
The c++ commandline syntax for gcc is 'g++'. Try this: 'g++ filename.cpp -o outputfilename'. g++ calls gcc with flags to recognize c++ code.
For larger projects with lots of source & header files I recommend qmake by trolltech (www.trolltech.com). It makes compiling easy.
I've made a tutorial on qmake. Check out my homepage: http://home.no/adiv/beginqt.htm