Unable to compile the simplest hello world project
Posted: Tue Feb 27, 2018 3:51 pm
Hi!
I just installed CodeLite and I guess that I'm falling in the most stupid of errors because I can't generate the classic Hello World C++ program.
I'm working on Windows 10. My compiler is MS Visual C++ 2015. CodeLite seems to have identified it correctly.
I first create a C++ workspace. Then, I create a project inside this workspace: name: hello_world; template: console / Simple executable MVC; create separate folder (hello_world, inside the workspace's folder); compiler: Visual C++ 14 (x64), debugger: GDB, build system: default.
The project shows up under the umbrella of the workspace. It contains two folders, src and include. Right click on src, then "Add a new file...". I select "C++ Source File (.cpp), and call the new file "main.cpp". It is located in the project's folder. It shows up under the "src" folder included in the project.
The main.cpp file contains the classic hello world stuff, cout'ing something to the screen.
I build the project (F7). This is the output written to the console:
I run via Ctrl + F5. A console shows up but nothing is printed there (the only text is "Press any key to continue"). There are no intermediate directories in the project folder (as Debug or Release). I can't find the .exe file! Furthermore, it does not matter how many errors I type in the main.cpp file, I always get 0 errors, 0 warnings. Even when I compile explicitly main.cpp via right click on the file and selecting "Compile".
Obviously, there's something I'm missing. Could you tell me what's wrong? I fell really stupid...
Regards,
Bleriot.
I just installed CodeLite and I guess that I'm falling in the most stupid of errors because I can't generate the classic Hello World C++ program.
I'm working on Windows 10. My compiler is MS Visual C++ 2015. CodeLite seems to have identified it correctly.
I first create a C++ workspace. Then, I create a project inside this workspace: name: hello_world; template: console / Simple executable MVC; create separate folder (hello_world, inside the workspace's folder); compiler: Visual C++ 14 (x64), debugger: GDB, build system: default.
The project shows up under the umbrella of the workspace. It contains two folders, src and include. Right click on src, then "Add a new file...". I select "C++ Source File (.cpp), and call the new file "main.cpp". It is located in the project's folder. It shows up under the "src" folder included in the project.
The main.cpp file contains the classic hello world stuff, cout'ing something to the screen.
I build the project (F7). This is the output written to the console:
Code: Select all
C:\Windows\system32\cmd.exe /C ""C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x64 > nul -e -f "hello_world.mk" MakeIntermediateDirs && "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x64 > nul -e -f "hello_world.mk" Debug/main.cpp.obj"
----------Building project:[ hello_world - Debug ] (Single File Build)----------
====0 errors, 0 warnings====
Obviously, there's something I'm missing. Could you tell me what's wrong? I fell really stupid...
Regards,
Bleriot.