View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022216 | Open CASCADE | OCCT:WOK | public | 2011-01-29 13:17 | 2011-07-12 14:33 |
Reporter | Assigned To | imv | |||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.5.0 | ||||
Summary | 0022216: Revise way to specify necessary libraries on Windows / MS VC++ compiler | ||||
Description | As a continuation of OCCTR 22193, I propose to revise a way how dependency on specific external libraries is defined, on Windows first of all, so as to make it easily configurable. If some OCCT package requires to be linked with some specific library (e.g. TKService now requires FreeImage), the standard way of doing this in WOK is to put EXTERNLIB file where relevant WOK symbol(s) are recorded. These symbols are defined (usually in CSF.eld) in platform-specific way, and used in providing appropriate options to the linker. This is Ok for WOK, since in any workbench the user can redefine these symbols and relevant compiler macros in CSF.edl if necessary. When MS VC++ projects are generated, currently the libraries that are defined in the current WOK environment get referred by all relevant projects. This makes it difficult to configure this after projects generation. For instance, compile-time dependency on FreeImage library can now be switched off easily by defining macro (the same as introduced for TBB in OCCTR 22193), but linker dependency is hardcoded to the project. To avoid this, I propose the following: - In all code that required linking to specific libraries, use MSVC++-specific pragma statements to declare this dependency. For instance, in Image_PixMap.cxx, we can put (inside #ifdef HAVE_FREEIMAGE clause): #ifdef _MSC_VER #pragma comment (FreeImage.lib) #endif - In project generator exclude the code that embeds references to EXTERNLIB libraries to VC++ project files The effect will be that dependency on the library for linker will be synchronized with actual use of it in the code when activated by HAVE_* macro. Thus such macros can be used simply to manipulate this dependency, without additional efforts. Note that paths to all third-party libraries will still need to be defined, which is not a problem. On Linux, it is desirable to reach similar level of flexibility by providing corresponding options to configure, line --no-freeimage | ||||
Tags | No tags attached. | ||||
Test case number | |||||
related to | 0022218 | closed | Open CASCADE | Make use of GL2PS library optional |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-01-29 13:52 |
|
OtherBugsDependingOnThis | => 22193 |
2011-01-29 13:54 |
|
BugsThisDependsOn | => 22218 |
2011-02-11 12:00 | bugmaster | Assigned To | bugmaster => imv |
2011-02-11 12:00 | bugmaster | Status | new => assigned |
2011-02-15 20:21 | imv | Status | assigned => resolved |
2011-02-17 16:03 | bugmaster | Status | resolved => verified |