This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I have a project setup with the following directory structure
mainLib
inc
src
lib
lib_a
src
inc
lib_b
src
inc
lib_a.lib [Lib file generated from lib_a]
lib_b.lib [Lib file generated from lib_b]
I can mark the lib_a.lib and lib_b.lib files as excluded, which works (otherwise the .libs are automatically included in the mainLib and the resulting .lib file size is large). The problem exists when i rebuild lib_a.lib or lib_b.lib...the lib_a.lib is removed, the project is rebuilt, and when the lib_a.lib file is recreated, it is no longer excluded from the mainLib project.
How can I fix this?
Thanks.
Will,
I would recommend a different structure.
mainLib
inc
src
lib_a
inc
src
lib_b
inc
src
Then setup lib_a and lib_b as referenced projects for mainLib if you want them to be linked with it (if you don't want them linked then don't setup the reference). The problem you are seeing is that when you rebuild lib_a or lib_b it deletes the lib which will also delete the fact that there is a file specific option associated with it (in this case exclude). When it is created again since it is under the mainLib dir structure it will be automatically included. If you separate the folders like I have above you can avoid the issue.
John
John,
Is this the only solution? This is a project that we started in CCS v3.3 and migrated to CCS v4...changing the directory structure involves changing how it is stored in our revision control system...from past experiences, people get pretty grumpy when that happens.
-Will
What about changing where the .libs from lib_a and lib_b get generated? i.e. put just those files outside the directory structure
Did you also exclude all the .c files from lib_a and lib_b? if not those are going to get built as well when you build mainLib.
All other files are excluded. It doesn't really make sense to me that I have to move the generated libs outside the directory. Is this really how excluding files should work?
Projects in v4 are file system oriented. If the file is in the project directory structure then it is part of the project, unless you exclude it. Very different from 3.3 where nothing is in the project unless you explicitly include it. That is the one thing that took me the longest to get used to in v4.
As far as moving the generated libs my thought was to go into build properties from the right context menu of the project. Select the "Build Settings" tab and specify a path in front of the Artifact name.
John
John,
I understand this idea about eclipse, but is it correct that if I exclude a file in the project, clean and rebuild the project, and now the file that i previously excluded is now included in the project? I seems like this is a bug. The same problem exists if I check out my entire project from revision control...the setting for exclude files on any that are generated is not preserved.
Thanks,
Will
The problem for the .lib is that the file gets deleted so the "exclusion" info is lost. If you see the same problem for source files being checked out that is definitely a bug.
John