Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Visual C++ compiler for the command line

keilkeil Member Posts: 10
I need to comiple code (OpenGL and DirectX) that is written under Microsoft Visual C++ as win32 applications. That code runs perfectly
if I compile it under Microsoft Visual C++.
But I want to comiple and run code out of another Application to do so I thought of using a compiler for the command line that is able to compile DirectX OpenGL and win32 code, but I dont know if a compiler for the command line for my problems is availible ?
Thanks a lot for help.

Comments

  • weiccoweicco Member Posts: 950
    : I need to comiple code (OpenGL and DirectX) that is written under Microsoft Visual C++ as win32 applications. That code runs perfectly
    : if I compile it under Microsoft Visual C++.
    : But I want to comiple and run code out of another Application to do so I thought of using a compiler for the command line that is able to compile DirectX OpenGL and win32 code, but I dont know if a compiler for the command line for my problems is availible ?
    : Thanks a lot for help.
    :

    Export makefile from MS VC++, it outputs .mak file in project root. Now you can compile your project using nmake. Open cmd.exe (or command.com or whatever) and cd to your project directory, then write following:

    [code]
    for release:
    nmake /f "projectname.mak" CFG="projectname - Win32 Release"

    for debug:
    nmake /f "projectname.mak" CFG="projectname - Win32 Debug"
    [/code]
  • Johnny13Johnny13 Member Posts: 128
    use the Windows port of GCC compiler http://mingw.org http://gcc.gnu.org
    and link OpenGL/DirectX by command line: [b]-lopengl32 -lddraw[/b] :-)
Sign In or Register to comment.