How do I change the build target in visual studio 2012?
The tutorial asks me to do that and I have no idea how:
http://www.ogre3d.org/tikiwiki/tiki-ind ... Tutorial+2
When I build a solution doesn't it just build everything in it?
Change build target in visual studio 2012
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
-
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 136
Re: Change build target in visual studio 2012
I assume the wiki page refers to the build output (so change the naming settings for the resulting EXE name to not overwrite the one from the previous tutorial), but I might be wrong here.
Not necessarily. You might have a solution with multiple projects in it and you can specify dependences between them and then depending on which projects you build, only some will be taken into account as needed. But in the specific case of the tutorials: Only those files that are included in your main file will be compiled, so if you have 5 files: main.cpp (with your main-method) and 2 x 2 tutorial files (header and source each for tutorial A and tutorial B) and you include only the header of tutorial A in your main.cpp, then I think tutorial B would not get compiled at all, since it is not reference/included.royibernthal wrote:When I build a solution doesn't it just build everything in it?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
Re: Change build target in visual studio 2012
I don't really have a main.cpp. or perhaps I have one and don't know where to look?
Do you think the tutorial wants me to create a new project for each part?
Do you think the tutorial wants me to create a new project for each part?
-
- Minaton
- Posts: 933
- Joined: Mon Mar 05, 2012 11:37 am
- Location: Germany
- x 110
Re: Change build target in visual studio 2012
Yes, and with different names not to overwrite the previous one.royibernthal wrote:Do you think the tutorial wants me to create a new project for each part?
If you only like to prevent the overwriteing, you can go to the General properties and change the Target Name for each tutorial.
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
Re: Change build target in visual studio 2012
Change the target name to a class name in General Properties?
Is there a way to duplicate a project with all of its settings? Creating a new project and changing the settings all over again every tutorial is not very comfortable.
Is there a way to duplicate a project with all of its settings? Creating a new project and changing the settings all over again every tutorial is not very comfortable.
-
- Minaton
- Posts: 933
- Joined: Mon Mar 05, 2012 11:37 am
- Location: Germany
- x 110
Re: Change build target in visual studio 2012
Whatever you want! This property is for the output.royibernthal wrote:Change the target name to a class name in General Properties?
Copy the project folder to a new location. Open the project copy androyibernthal wrote:Is there a way to duplicate a project with all of its settings? Creating a new project and changing the settings all over again every tutorial is not very comfortable.
Transporter wrote:go to the General properties and change the Target Name for each tutorial.
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
Re: Change build target in visual studio 2012
I think I understand (correct me if I'm wrong), I'm not really concerned about building over existing builds since I'm still at a learning phase.
Do you mean copying the project in Windows Explorer? Looks like I'll have to rename many stuff.
I don't see a right click -> copy inside visual studio.
Do you mean copying the project in Windows Explorer? Looks like I'll have to rename many stuff.
I don't see a right click -> copy inside visual studio.
-
- Minaton
- Posts: 933
- Joined: Mon Mar 05, 2012 11:37 am
- Location: Germany
- x 110
Re: Change build target in visual studio 2012
Are you making fun of me?royibernthal wrote:Do you mean copying the project in Windows Explorer? Looks like I'll have to rename many stuff.
I don't see a right click -> copy inside visual studio.
- Open the windows explorer
- Navigate to the folder of your tutorial project
- Go one directory up
- Make a copy of the folder with you tutorial project
- Rename the copy of your first tutorial folder
- Open the Visual Studio Solution
- Right click on the project in SolutionExplorer
- Choose Properties
- Click on General in left tree
- Change the Target Name property on the right side
- Close the dialog by clicking on ok
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
Re: Change build target in visual studio 2012
I did just that then thought you wanted me to rename the newer folder instead of the older folder (meaning its files as well), that way indeed makes more sense.
As for the Target Name, is it to avoid building over previous tutorial builds? If so it should be fine for me to leave it the same if I don't mind that happening right?
As for the Target Name, is it to avoid building over previous tutorial builds? If so it should be fine for me to leave it the same if I don't mind that happening right?
-
- Minaton
- Posts: 933
- Joined: Mon Mar 05, 2012 11:37 am
- Location: Germany
- x 110
Re: Change build target in visual studio 2012
The Target Name property sets the file name for the output file, so if you change it you have different output files. A second solution is renameing the project in Visual Studio because the Target Name consists of the project name.royibernthal wrote:As for the Target Name, is it to avoid building over previous tutorial builds? If so it should be fine for me to leave it the same if I don't mind that happening right?
-
- Halfling
- Posts: 41
- Joined: Fri Feb 08, 2013 8:16 pm
Re: Change build target in visual studio 2012
Okay got it. Thanks again you helped alot.