locked
makefile and sln vs 2010 RRS feed

  • Question

  • Hello.
    I have a makefile and sources and would like to create a solution or this. vcproj for visual c, is it possible?
    is there any tool?
    thanks
    Sunday, January 2, 2011 11:23 AM

Answers

  • Hi, 

    Hope this document helps. 

    http://msdn.microsoft.com/en-us/library/txcwa2xx%28v=vs.80%29.aspx

    To open and build your project using Visual Studio, first create an empty project containing the appropriate build settings using the Makefile Project Wizard. You can then use this project to build your project from the Visual Studio development environment.


    Support Engineer
    • Marked as answer by Jesse Jiang Friday, January 7, 2011 3:47 AM
    Sunday, January 2, 2011 12:09 PM
  • Yes, it's possible; there's a built-in method to do it.  See How to: Create a C++ Project from Existing Code and note the following:

    Choose 'Visual C++' as the type of project.

    You are then asked to Specify the location of the project and source files.  You will probably want to locate the project file in the top level folder (but no higher) of your source file; notice also the checkbox marked 'Add files to the project from these folders' and the accompanying controls, which allows you to directly add the source files into the project, which won't determine the sources which get built (the makefile will do that) but is useful for other purposes.

    The key point for creating a makefile project from existing files is on the following page of the wizard: 'How do you want to build the project?'  For your purposes, select 'Use external build system'  (which is what nmake.exe is as far as VS is concerned) and click 'Next'. 

    You are then presented with 'What settings do you want to specify for the Debug configuration?'; it is the three command lines (Build, Rebuild and Clean) which determine how the project is actually built, and here you must specify the complete make command line corresponding to those actions, for example

    Build Command line: "nmake"

    Rebuild Command Line: "nmake clean; nmake"

    Clean Command line: "nmake clean"

    ( You may need to add "/f  path\to\makefile" to those nmake commands. )

     


    Answering policy: see profile.
    • Marked as answer by Jesse Jiang Friday, January 7, 2011 3:47 AM
    Sunday, January 2, 2011 7:23 PM

All replies

  • Hi, 

    Hope this document helps. 

    http://msdn.microsoft.com/en-us/library/txcwa2xx%28v=vs.80%29.aspx

    To open and build your project using Visual Studio, first create an empty project containing the appropriate build settings using the Makefile Project Wizard. You can then use this project to build your project from the Visual Studio development environment.


    Support Engineer
    • Marked as answer by Jesse Jiang Friday, January 7, 2011 3:47 AM
    Sunday, January 2, 2011 12:09 PM
  • Yes, it's possible; there's a built-in method to do it.  See How to: Create a C++ Project from Existing Code and note the following:

    Choose 'Visual C++' as the type of project.

    You are then asked to Specify the location of the project and source files.  You will probably want to locate the project file in the top level folder (but no higher) of your source file; notice also the checkbox marked 'Add files to the project from these folders' and the accompanying controls, which allows you to directly add the source files into the project, which won't determine the sources which get built (the makefile will do that) but is useful for other purposes.

    The key point for creating a makefile project from existing files is on the following page of the wizard: 'How do you want to build the project?'  For your purposes, select 'Use external build system'  (which is what nmake.exe is as far as VS is concerned) and click 'Next'. 

    You are then presented with 'What settings do you want to specify for the Debug configuration?'; it is the three command lines (Build, Rebuild and Clean) which determine how the project is actually built, and here you must specify the complete make command line corresponding to those actions, for example

    Build Command line: "nmake"

    Rebuild Command Line: "nmake clean; nmake"

    Clean Command line: "nmake clean"

    ( You may need to add "/f  path\to\makefile" to those nmake commands. )

     


    Answering policy: see profile.
    • Marked as answer by Jesse Jiang Friday, January 7, 2011 3:47 AM
    Sunday, January 2, 2011 7:23 PM
  •  

    Hi,

     

    I'm very interested in hearing more about your issue, did you solve your problem?

    If so please share the solution with us and mark the right answers.

    If not please let me know and I will tray to help you find further solutions.

     

    Have a nice day!

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 6, 2011 9:49 AM