Click here to Skip to main content
15,921,113 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am using C++ Visual Studio. In Linker settings in my project, i tried to change the OutputFile path, but getting errors. How can i do that..
The path is

%program files%/Library Manager/Library Manager.exe
Posted
Updated 22-Jun-12 9:17am
v2
Comments
Vitaly Tomilov 22-Jun-12 14:39pm    
What exactly is the error that you are getting?
Harmanjeet Singh 22-Jun-12 15:16pm    
Getting no errors, but the file is not there even after a successful build, and nor the folders created.. Dont know where's the error.. :(
Richard MacCutchan 22-Jun-12 15:20pm    
Look at the build logs in the project directories.

That does not look like a valid path based on the macros defined in Visual Studio. Re-check your settings in the project properties.
 
Share this answer
 
Comments
Harmanjeet Singh 22-Jun-12 15:30pm    
Rest of the properties are fine, when i just changed the path and build, i couldnt find a file or folder that i created using the visual studio build using this path. i mean, there was no folder Library Manager in Program Files directory and nor that exe anywhere..
Richard MacCutchan 22-Jun-12 15:38pm    
Yes, either because the variable %program files% does not exist, or it points somewhere else. As I said, check the macros available in VS when you change the path. It's no good just typing in something that you think may be correct. Also check in your local and root directories to see if it ended up there by mistake.
Harmanjeet Singh 22-Jun-12 15:56pm    
i checked again. its creating the folder & exe now in C:\
but not in C:\Program Files\
i used
%program files%/Library Manager/Library Manager.exe
Richard MacCutchan 22-Jun-12 16:02pm    
Well, as I have explained twice already that macro does not exist in Visual Studio so I'm not surprised. Go to the Link properties and use the proper edit Window to see what macros are available.
Harmanjeet Singh 22-Jun-12 16:04pm    
Hey! it worked!! thanx.. :)
In any non-nonsense C++ project settings, the output directory is specified relative to the solution path, which is obtained as $(SolutionDir). You are trying to setup an absolute path in one or another way, which is always a bad idea. You should assume that your program is placed in any location where is should successfully work. If this requirement is not met, you are wasting your time.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900