I have been given some C code to compile which is several years old and need to compile it to see exactly what the program does. I know visual basic to an amount but i haven't touched C before. Anyway, how do i go about compiling the C code when that is all i have (eg. no project files currently). I have the various Express 2008 programs and Dev-C++ but am unsure how to go about making the program run. Please help asap!

8 Years
Discussion Span
Last Post by RedStarlight

you should first create an empty project then copy the source files that you have into the project directory and finally add the files to the project. If you are using VC++ 2008 Express: read and watch this tutorial

If you really have zero knowledge of C language then I'd suggest you take a look at some online tutorials or read a book. There are many suggestions in the Read Me threads at the top of the C++ board.


Hmm MSDN seems to be having problems at the moment "Sorry, we were unable to service your request." I will try that one again in the morning. Incidentally, if i try to compile anything in Dev-C++ (latest version) i get "D:\Dev-Cpp\Makefile.win [Build Error] [main.o] Error 1 " even a hello world program won't compile. Is it worth trying to sort this or just use C++ 2008? The program isn't too long luckily and most of the things that come up in it look similar to VB 2008 code so i won't have too many problems with annotating the listings, its just getting the damn thing to run! Thanks for the speedy reply by the way :)


If you can get to this page scroll down to the bottom of the page and click the Introduction to Visual C++ Video" link.

Regarding Dev-C++. What version of MS-Windows are you using ? It has a vew problems with Vista that you need to correct in the compile options.


Yep, sorry should have added to that; yes it is the evil (?) vista so I should have assumed as much. I can get to that page but again the page it links to is either down or just isn't loading for me. Could you drop me a direct url to download the video or to how to sort the Dev-C++ compiling problem? Sorry to be a pain but your help is much appreciated!


Video here

I'm not having a problem with any of the links I posted. They work ok for me.

The changes for Dev-C++ are just directory settings. Go to menu Tools --> Compiler Options. In there change the relative paths to full paths in each of the tabs.


Thanks that link worked that time, i don't know what all those problems were about.

In regards to Dev-C++, do you mean such as changing "C:\Dev-Cpp\Bin" to be in the directory where the project is stored? So would be, "C:\Dev-Cpp\MyProgram\Bin"?
Sorry, lack of sleep recently.


What I mean is to change "..\bin" to "c:\Dev-C++\bin" You have to do that in each of those directory categories shown in the combo box.


Urgh i don't know what im doing wrong here, the directories are set as following and the program was installed with the default options:

Binaries: "C:\Dev-Cpp\Bin"
Libraries "C:\Dev-Cpp\lib"
C Includes "C:\Dev-Cpp\include"

I still get a "C:\Dev-Cpp\Makefile.win [Build Error] [main.o] Error 1 " though?

I managed to solve compiling the program in Visual Studio 2008 command prompt :) Thanks for the help i don't need to sort out Dev-Cpp now. Many thanks and keep up the good work, its much appreciated!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.