Hi,
I would name the program "harmonic.cpp", rather than "harmonic.c", because
it contains some instructions that are not part of C, like the ones used
for printing.
To compile and link, I would try the following command:
"path\bin\g++ -Ipath\include -Ipath\include\g++ -o harmonic.o harmonic.cpp"
In the above you should replace "path" with the path where you have
installed Dev-C++, for example if Dev-C++ is in "c:\programs\devcpp", then
your command should be:
"c:\programs\devcpp\bin\g++ -Ic:\programs\devcpp\include
-Ic:\programs\devcpp\include\g++ -o harmonic.exe harmonic.c"
Of course you should issue the command from within a DOS box and being in
the directory which contains the file "harmonic.cpp".
If the above does not work let me know, also if you wish to carry out the
above task with some shorter command also let me know, I have a couple of
programs that can help doing so.
At 16.41 15/11/01 -0500, Evan Hempel wrote about Cuong2001's post:
>I assume you mean to compile it, and that the program is in a file called
>harmonic.c
>
>Since dev-cpp uses gcc as it's compiler, I think you would youise the
>following command, from the file's directory:
>
>gcc harmonic.c -o harmonic.exe
>
>however, since it is a windows compiler, it might need other options? :-)
--
gisan
gi...@li...
|