![]() |
|
[Mint] Help with compiling C++ - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88) +---- Forum: Linux (https://hackforums.net/forumdisplay.php?fid=85) +---- Thread: [Mint] Help with compiling C++ (/showthread.php?tid=4968778) |
[Mint] Help with compiling C++ - Paul Wilson - Aug 29, 2015 Hi guys I installed mint today, and I made a hello world program in c++. I would like to compile it. I installed all of the things (build essential, g++, etc...) and when I try to compile it it gives me various errors: Here is the code I would like to compile: Code #include <iostream>It is saved as helloworld.cpp, and I am compiling it with this command: gcc helloworld.cpp -o helloworld And I get this error: Code /tmp/ccssFjje.o: In function `main':Could someone help me solve this issue? Thanks * - scam. - Aug 29, 2015 Use g++ to compile c++. There is no errors in that code, although there is no point having 'int integer;' but I assume that was left over from something you were doing before. * - Paul Wilson - Aug 29, 2015 (Aug 29, 2015 10:50 PM)Mael Wrote: Use g++ to compile c++. There is no errors in that code, although there is no point having 'int integer;' but I assume that was left over from something you were doing before. Ah, so g++ is for c++ and gcc is for c? I assume it is because this worked, I feel so stupid now lol, thanks for helping me for the second time 🤝 * - scam. - Aug 29, 2015 (Aug 29, 2015 10:55 PM)MishaTheHoovy Wrote: Ah, so g++ is for c++ and gcc is for c? I assume it is because this worked, I feel so stupid now lol, thanks for helping me for the second time 🤝 No problem my man. I just like activity in this section. |