Suggestion for the OCC team

Why don't you insert on each header the automatic library import , so the windows users doesn't have to manually include the required LIB files? The only side-effect would be that all the required dll's will be direcly needed and not needed as "sub-dependencies".
Use #pragma comment(lib,"tkstep.lib") for example
Many times I didn't know on which LIB file a class was defined , so I ended up by including the entire LIB collection !

Just a tip, from a lazy programmer :)
QbProg

Forum supervisor's picture

Dear Thomas,

We appreciate your suggestion which is quite logical and reasonable. However, the proposed solution has several drawbacks:

* It is suitable for limited set of compilers only (ex. MS VC++). As OCCT is a cross platform system, we try to avoid platform dependent approaches.
* It should be possible to use header file without having linking to the library (for instance, header file defining some enumeration)
* It does not solve the problem completely: even if the user application will be automatically linked with only needed .lib files, this list will not be explicit for developer. Thus the problem will re-appear when the developer will need to figure out the list of .dlls to be deployed along with his application.

Possible alternative solution would be providing specific header files, one per OCCT module, containing #pragmas for toolkits of that module. Even if this would not solve the listed problems, probably it could help users in the situations like one you described.

What is your opinion?

Sincerely,
Forum Supervisor