Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Choose which source file will be compiled, linked, etc in VS 2010

Choose which source file will be compiled, linked, etc in VS 2010

Scheduled Pinned Locked Moved Visual Studio
c++visual-studiotutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blackhattrick
    wrote on last edited by
    #1

    Hi ¿Is it posible to configure a VS2010 C++ WinApi32 project to select which c/cpp file generates some obj file, and configure which obj file are linked to generate the exe file? Basically what I need is the same features that an old nmake project with a make file do. For example, I have 3 source files myAppVer1.c, myAppVer2.c and MyAppVer3.c. I want to configure VS to create myApp.obj from myAppVer2.c, then link this obj file with some other obj files (if any) to create MyApp.exe I have done some research and VS has the NMake project feature, but its an empty project and I would have to do all the commands, setting vars and the makefile from scratch. If this is the only way, is there some wizard/tool/whatever that makes in a NMake project the directory structure/makefile/etc with the common/basic settings for an WinApi32 app? Hope I made myself clear and excuse my English for any mistake :) Regards.

    L 1 Reply Last reply
    0
    • B blackhattrick

      Hi ¿Is it posible to configure a VS2010 C++ WinApi32 project to select which c/cpp file generates some obj file, and configure which obj file are linked to generate the exe file? Basically what I need is the same features that an old nmake project with a make file do. For example, I have 3 source files myAppVer1.c, myAppVer2.c and MyAppVer3.c. I want to configure VS to create myApp.obj from myAppVer2.c, then link this obj file with some other obj files (if any) to create MyApp.exe I have done some research and VS has the NMake project feature, but its an empty project and I would have to do all the commands, setting vars and the makefile from scratch. If this is the only way, is there some wizard/tool/whatever that makes in a NMake project the directory structure/makefile/etc with the common/basic settings for an WinApi32 app? Hope I made myself clear and excuse my English for any mistake :) Regards.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You can modify your project such that myAppVer1.c and myAppVer3.c are excluded from the build, and the output file is called myApp.obj. Use the mouse right-click on the project and select Properties to see what can be changed. Alternatively you can create multiple projects within a solution that include only specific source files from a common directory, again using the Properties.

      Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups