-
January 20th, 2009, 08:24 AM
#1
organizing code files in a .lib
I'm trying to organize the code files on a project I am working on just now, currently I have all the files in the same directory and these files are in different 'filters' in my visual c++ project (visual c++ express 2008) seperating them into there different modules.
It's not that big of a problem them being all in the same directory but when I want to use the library I need all the headers of the project in one directory and all the source files in another, is there any way to do this in visual c++ or whats the normal way of doing this?
-
January 20th, 2009, 08:27 AM
#2
Re: organizing code files in a .lib
I have no idea why you'd need all the source files in the same directory. That shouldn't matter. Headers you can put wherever you like, just adjust the Additional Include Directories accordingly. Similar for .libs and the Additional Library Directories.
-
January 20th, 2009, 08:31 AM
#3
Re: organizing code files in a .lib
but when I goto Filter->Add New Item->... it will place the file in the project folder rather than the corresponding directory?
and I now have a LOT of .cpp files in the project directory, when I try to move them to a directory for the 'module' they should be in
it gives me a linker error.
Last edited by staticVoid; January 20th, 2009 at 08:35 AM.
-
January 20th, 2009, 09:46 AM
#4
Re: organizing code files in a .lib
You have two options....
1) Open the .vcproj file in a text editor and manually edit the file paths, or
2) Remove all files from the project, put them where you want, and then re-add them using "Add Existing Item".
Note this will only work for source files. Adding an include file is just for convenience, it doesn't actually modify the Include Directories.
-
January 20th, 2009, 10:26 AM
#5
Re: organizing code files in a .lib
thanks for your reply, would I be better to just leave all the files in the project directory until I've finished the project or would it be better to separate them? say I wanted to change a directory name, would it mean I would have to reload all the files again?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|