D. Barbier
unread,Aug 14, 2012, 9:12:02 AM8/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to oce...@googlegroups.com
On 2012/8/12 Carlos wrote:
> Hi,
>
> I have installed OCE 0.10 with the static libraries flag and everything
> compiles OK except two error messages in TKV3dD.lib and TKOpenGLd.lib.
>
> The first one I think it is a bug in graphic3d_wntgraphicdevice.cxx as the
> definition of
>
> Graphic3d_WNTGraphicDevice::Graphic3d_WNTGraphicDevice (const
> Standard_CString theGraphicLib) is overpassed as the flags
> OCE_BUILD_STATIC_LIB and HAVE_NO_DLL are activated.
>
> As I use Graphic3d_WNTGraphicDevice() instead of
> Graphic3d_WNTGraphicDevice(theGraphicLib) I have removed the overload and it
> compiles OK.
>
> For the second one I do not understand the error but I suppose that it is
> related with the definition of InterfaceGraphic_RealizePalette, that is
> declared as dllexport and it is created in a static library, but I really do
> not know how to fix it.
>
> __declspec ( dllexport ) long InterfaceGraphic_RealizePalette ( HDC hdc,
> HPALETTE hPal, BOOL fBkg, BOOL fUseStatic )
>
> In a initial test this function is not called either so I have commented and
> all the libraries have compiled OK. Then the C# sample from Opencascade can
> be compiled an runs OK
Hello Carlos,
Thanks for reporting these issues.
> 1>TKV3dD.lib(Graphic3d_WNTGraphicDevice.obj) : error LNK2019: unresolved
> external symbol "private: void __thiscall
> Graphic3d_WNTGraphicDevice::SetGraphicDriver(char const * const)"
> (?SetGraphicDriver@Graphic3d_WNTGraphicDevice@@AAEXQBD@Z) referenced in
> function "public: __thiscall
> Graphic3d_WNTGraphicDevice::Graphic3d_WNTGraphicDevice(char const * const)"
> (??0Graphic3d_WNTGraphicDevice@@QAE@QBD@Z)
There are many ways to fix this issue, for instance by adding in the
#else clause:
void Graphic3d_WNTGraphicDevice::SetGraphicDriver (const
Standard_CString theGraphicLib)
{
Aspect_GraphicDeviceDefinitionError::Raise("SetGraphicDriver is
not available when using static libraries");
}
> 1>TKOpenGLd.lib(OpenGl_Window.obj) : error LNK2019: unresolved external
> symbol __imp__InterfaceGraphic_RealizePalette referenced in function
> "public: __thiscall OpenGl_Window::OpenGl_Window(class Handle_OpenGl_Display
> const &,struct CALL_DEF_WINDOW const &,void *)"
> (??0OpenGl_Window@@QAE@ABVHandle_OpenGl_Display@@ABUCALL_DEF_WINDOW@@PAX@Z)
>
> 1>Debug\OCC.dll : fatal error LNK1120: 2 unresolved externals
I am not familiar with Windows and cannot test, but you may try to
edit inc/InterfaceGraphic_WNT.hxx and replace
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
__declspec( dllimport ) long InterfaceGraphic_RealizePalette ( HDC,
HPALETTE, BOOL, BOOL );
#ifdef __cplusplus
}
#endif /* __cplusplus */
by
#include <Standard_Macro.hxx>
Standard_IMPORTC long InterfaceGraphic_RealizePalette ( HDC,
HPALETTE, BOOL, BOOL );
Denis