Standard_EXPORT dllimport and dllexport

When building an application using OpenCasCade on Windows symbols get exported and a .lib and .exp file are created. This is caused by the macro Standard_EXPORT being defined as __declspec( dllexport ) (Standard_Macro.hxx).
I would like the symbols to be defined as __declspec( dllimport ). I worked around this by using:
#define Standard_EXPORT __declspec( dllimport )
before include any OpenCasCade headers. This however doesn't seem the proper way to deal with this. Does anyone know how it should be done?



QbProg's picture

Are you sure? I mean, it should be automatically defined as dllimport. I use OCC headers in a DLL application and I've got no OCC symbol exported.

gveldkamp's picture

It also happens when building the sample applications, for example the MFC AIS Basic sample.

The linker shows the following output:
Creating library ../Debug/AISBasic.lib and object ../Debug/AISBasic.exp