Archived

This topic is now archived and is closed to further replies.

andrew99

compilers

Recommended Posts

Thank you,
Please can you reccomend a decent c++ compiler, that is free. And where can I get it.
The compiker I have currently runs through msdos and does not create a .exe file. Thanks again.
Ps. I am on windows 98.

Share this post


Link to post
Share on other sites
quote:
Original post by andrew99
Thankyou but dev-c++ is the one I have got. it only runs the files in MSDOS and doesn''t allow an .exe file to be made. am I using it wrong


If your program runs in a console window (not the same as MS-DOS), you most likely created a console project. Create a windowed project (don''t remember the exact name) if you don''t want to have a console window automatically opened for your application.

It certainly does generate exe-files. Compile a project and look in the project''s directory. As long as the compilation succeeded there should be an exe there.

Share this post


Link to post
Share on other sites
When I open the file ''ch''. It comes up with a small window, with the c:\ symbol.
I select the directory where my file is. ''cd my documents++'' and type the file i want to run ''hm.txt'' it runs the file in the same window and then goes back to the c:\my documents etc...
am I running the wrong file. If so where is the right file.

Share this post


Link to post
Share on other sites
I've got MS Visual Studio .NET, but decided to download Dev-Cpp to try it out. I was very impressed. The only thing I needed to do was add the c++\mingw include directory to the include search list to resolve a problem compiling a program the uses iostreams.
I did find that it does NOT like spaces in the path to the directory it is installed in, so "C:\Program Files\Dev-Cpp" is right out. I may have been able to resolve that issue with a little more effort.
I am not a Dev-Cpp expert, my first exposure to it being yesterday. That said, the version I downloaded, version 5.0 beta 7 (4.9.7.0), does not seem to create any 'ch' file. Also, I am not sure what you mean by running 'hm.txt'. A program file should have the extension .exe.
After creating your project and entering your program source, you should compile the program by selecting the Execute->Compile menu item (or the corresponding function key or toolbar button). After fixing any problems that the compiler reports, you can run the program by selecting the Execute->Run menu item.
I hope this helps.

Shawn


[edited by - ShawnO on March 19, 2003 9:05:08 AM]

Share this post


Link to post
Share on other sites
Also Dev-C++ features multiple languages for other people. The last version is 4.9.7.8 which can be downloaded by accessing Tools->New Package. One thing I did not figure out is the bug report which does not immediately access to vRoach. I don''t know what ".ch" stands for but you can see which extension Dev-C++ supports with Tools->Environment Options->File Association.

Share this post


Link to post
Share on other sites
Thanks I downloaded dev-c++ again and got what looks correct. I don''t know what I had before but it wasn''t this. When I click on new project, it comes up with a file called main. which contains a load of code. Where do I put the code for my program.

Share this post


Link to post
Share on other sites
quote:
Original post by andrew99
it comes up with a file called main. which contains a load of code. Where do I put the code for my program.

Do yourself a huge favour and read a good book on C++ before going any further. Like Thinking in C++. You might also want to pick up a book on Win32 programming and one on OpenGL. And add a shortcut to MSDN.

Following this simple advice will save you lots of pain, frustration and time

Share this post


Link to post
Share on other sites
I have read a book on c++. and understand it quite well.
My code works perfectly well on my old compiler but ddoesn''t create a .exe file. It seems to be some sort of debugging file.

Share this post


Link to post
Share on other sites
quote:
Original post by andrew99
When I click on new project, it comes up with a file called main. which contains a load of code. Where do I put the code for my program.


The main.cpp you describe is actually a template i.e. a code sample. Since the project is created, you can either edit the current main.cpp or create a new file on which you associate with the current project.

Share this post


Link to post
Share on other sites