Re[2]: [Dev-C++] In desperate need of help
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2002-11-24 19:52:51
|
Hello Everyone! Sunday, November 24, 2002, 5:35:47 PM, Ioannis wrote: IV> If anything else fails you can place c:\dev-c++\bin in your path and use IV> g++ from the command line in the style: IV> g++ temp.cpp -o temp IV> or for C: IV> gcc temp.c -o temp That is all true, but for a project with more than one file, it won't work. You have to compile the source files individually to object (.o) files, then you need to link them together. Something like this: (The -c flag tells gcc not to link, but just to compile) gcc -c -o temp1.o temp1.c gcc -c -o temp2.o temp2.c gcc -c -o temp3.o temp3.c Some resources (if you have): windres -i tempres.rc -o tempres.o Then link together: gcc temp1.o temp2.o temp3.o tempres.o -o temp.exe -mwindows If you use common controls (if you call InitCommonControls() in your program, then you do) use the -lcomctl32 flag too at the linking. -- Best regards, Oroszi Balázs mailto:or...@vp... PGP-FP: FB80 8A43 2664 6126 E465 46E2 2546 CFA3 C25B 9F70 finger -l or...@se... |