I’m trying to make a program, which would run cl.exe (C/C++ compiler) and compile a C++ program. Here’s my code:
Module Module1
Sub Main()
Shell("C:\Program Files\Microsoft Visual Studio 10.0\VC\ _
bin\cl.exe /EHsc ""C:\myprogram.cpp"" ")
Console.WriteLine("Compilation Succeded")
Console.ReadLine()
End Sub
End Module
This doesn’t compile the .cpp file. Do you have any ideas how to make this work?
EDIT: I entered “C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe” /EHsc “C:\myprogram.cpp” in CMD and it didn’t compile, but instead it threw an error ( This application has failed to start because mspdb100.dll was not found. )
EDIT: I executed my program trough ‘VS Command Prompt’ and it compiled my program (it showed that it compiled), but there’s no compiled exe and obj files.
Never mind, instead of using cl.exe I’m now using MSBuild. Much better.