I have C:\MinGW
and C:\wxWidgets
. My wxWidgets is nicely installed and built. Im trying to compile a "Hello World" program in notepad using Command Line Prompt.
I can compile this main.cpp
just fine:
#include <iostream>
using namespace std;
int main() {
cout << "Hello World" << endl;
return 0;
}
with: g++ -std=c++11 main.cpp
When I try to compile a wxWidgets simple line like this:
#include <wx/wx.h>
g++ main.cpp
I get errors (wx/wx.h doesn't exist)
What is the syntax to compile the program using the command line?
I have tried g++ -std=c++11 -Ic:/wxWidgets/include main.cpp
and I still get errors. I am missing a lot of things. I have to compile with command line and without an IDE.
Also, any explaination about -I
or about what is linking / how to link, would be appreciated. I am new to C++