Carlos García del Monte wrote:
> Did you add the switches -I"C:\MinGW\include"
> -I"C:\MinGW\include\c++\3.2" -L"C:\MinGW\lib" ( -mconsole (or -mwindows)
> and -lmsvcrt (adapted to your directories) ? Because I noticed that when
> all that is not there it doesn't find any header or library.
If you wan't to use MinGW from the command line, then you should
download the latest MinGW package, and install it. That way gcc will
find everything, and no need to add -L and -I stuff (except for your own
libs and includes). It is also a good idea to put the .../gcc/bin
directory to your PATH, that way you can use gcc from anywhere.
The usage is as follows (roughly):
gcc -Wall -c -o source1.o source1.cpp
gcc -Wall -c -o source2.o source2.cpp
...
gcc -o program.exe source1.o source2.o ...
You may replace gcc with g++ for c++ code. You can ask me about usage
from command line, as I have used it a lot, and I still use it a lot
nowadays.
Alan, if you could post the errors you get, that would help the most.
--
Greetings,
Balázs
|