Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling a C program

Status
Not open for further replies.

peekay

Programmer
Oct 11, 1999
324
0
0
ZA
I am a VB programmer and have an application where I must use a program written in C (or C++ - I would not know the difference). I have the .c and .h text files and makefile file. Can anybody help me with the steps I have to take to compile this program. I have Visual studio 6
 
Hi peekay!<br>
<br>
If you have a Visual Studio workspace file (*.dsw), it would be best to just open it with the IDE and hit F7. You're done (assuming no errors).<br>
<br>
If you have the makefile, it would be best if you used the NMAKE program:<br>
<br>
Open a DOS window, change to your c:\program files\microsoft visual studio\vc98\bin directory. Run the VCVARS.BAT file to set your environmental variables correctly (so the NMake program can find the compiler and linker programs). Now change to the directory where your source files are. Then say NMAKE &lt;makefilename&gt;. You should end up with a compiled EXE or DLL.<br>
<br>
Chip H.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top