samedi 25 juin 2016
Split a Visual Studio C++ project : how to do it (almost) automatically?
I have a Visual studio 2015 C++ project that has references to a few 3rd-party free library.
Just to reduce compile time (currently 5 - 90 seconds),
I want to split the project into many smaller projects.
In preparation, I have already created filters in the solution explorer.
The filters show a top-level structure of my project - divided into tier :-
Tier 1 - my core library, no reference to outside, rarely change
Tier 2a - my custom encapsulator for external library "A"
Tier 2b - my custom encapsulator for external library "B"
...
note: all Tier2 #include Tier1 , rarely change
Tier 3 - business logic that rarely change, #include Tier1&2
Tier 4 - business logic that often change , #include Tier1&2&3
Question : How to split this project into many projects easily?
e.g. almost easy as click a filter then select "extracted to a new project"
I have read some sources - their explanation suitable for how to create from scratch, not for an existing project.
It also seems that I have to add some lines for some individual files.
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif
I have >100 files, so it is not very practical.
I googled "split visual studio c++ project", but did not find many results.
Relate question : not explain "how"How do you split a Visual Studio Solution?
External link : all has the line #define DECLDIR __declspec(dllexport)http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855/DLL-Tutorial-For-Beginners.htmhttps://manski.net/2011/11/creating-a-dll-project/
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire