OCCt for Web Application

Hello
I tried to build occt WebGL sample by using wasm_build.wasm which exists in the 7.5 version
it fails and when I opened the build_wasm.log I found these lines
can anyone tell me what these errors mean or can tell me the good approach to build the WebGL sample ?

Generation time: 00:02:40
In file included from C:\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\src\Font\Font_FontMgr.cxx:34:
C:/OpenCASCADE-7.5.0-vc14-64/freetype-2.5.5-vc14-64/include\freetype.h:1778:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
FT_EXPORT( FT_Error )
^
C:/OpenCASCADE-7.5.0-vc14-64/freetype-2.5.5-vc14-64/include\config/ftoption.h:282:27: note: expanded from macro 'FT_EXPORT'
#define FT_EXPORT(x) __declspec(dllexport) x
^
In file included from C:\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\src\Font\Font_FontMgr.cxx:34:
C:/OpenCASCADE-7.5.0-vc14-64/freetype-2.5.5-vc14-64/include\freetype.h:1797:3: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
FT_EXPORT( FT_Error )
^
C:/OpenCASCADE-7.5.0-vc14-64/freetype-2.5.5-vc14-64/include\config/ftoption.h:282:27: note: expanded from macro 'FT_EXPORT'
#define FT_EXPORT(x) __declspec(dllexport) x .......

Emad Samni

Kirill Gavrilov's picture

Your log refers to FreeType library built for Visual Studio. Web-sample requires FreeType being built by Emscripten SDK. Note that within OCCT 7.6.0dev development snapshot it is also possible disabling FreeType dependency (however in this case you will not be able displaying a text in 3D Viewer).

Maybe the following forum topic could be also helpful.

emad samni's picture

Thanks, Mr.Gavrilov for your response
Actually, I have a good experience with using OpenCascade for desktop applications, however now I need to build my own instance on the Web side, for me the steps that they motioned in the web sample tutorial are not clear.
my questions are:
- how to build the FreeType library by Emscripten SDK and is there any problem if I use a specific version of Emscripten?
- is there other libraries that should set it in the wasm_build.bat?
- is the wasm_build.bat enough to build the web sample? please clear the steps to build the web sample

I appreciate your help

Emad Samni