vmanes
Postaholic
2,015 posts since Aug 2007
Reputation Points: 1,283
Solved Threads: 242
Skill Endorsements: 6
thanks for the links...they are really useful...
but my problem is that i dont know what are commands to compile and run the cpp program..
ok see
steps are
1.save file in bin
2.run command prompt
3. type in cd c:\dev-cpp\bin now i m in the same directory where the compiler and the program is saved...
now what next to compile my porgram named test.cpp
in java i know those commands they are
cd c:\program files\java\jdk1.5\bin
c:\program files\java\jdk1.5\bin> javac filename.java
c:\program files\java\jdk1.5\bin> java filename this is a test program
...
output
the line THIS IS A TEST PROGRAM in the third line is a command line argument..
i wanna know the cpp equivalent for this..
You don't have to compile it from the command prompt. In fact in the dev environment click the compile button (not the compile AND run button) and that will give you an executable. Then all you need to do navigate to that path using cd c:\dev and run your program from there.
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046139290&id=1043284392
iamthwee
Posting Genius
6,254 posts since Aug 2005
Reputation Points: 1,567
Solved Threads: 476
Skill Endorsements: 33
After creating the command prompt window you have to add the dev-cpp\bin to your PATH environment then execute make.exe
c:\Dev-C++:>make -f makefile.win <Enter>
The makefile.win should have been generated by the Dev-C++ IDE. If not, then you will either have to learn how to create it manually (its a big pain in the a**) or let the IDE do it for you. Alternatively you can type all the commands in the makefile yourself each time you want to compile the program -- which is another big pain in the rear.
Ancient Dragon
Achieved Level 70
32,109 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68
Thanks for your response to a three-year-old thread :)
For anyone else who stumples upon this thread, I don't recomment Dev-C++ any more because its a dead IDE and uses an old compiler. Get Code::Blocks.
Ancient Dragon
Achieved Level 70
32,109 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68