Mon, 05/09/2022 - 07:11
Forums:
>emmake make install
make: make install
[ 33%] Linking CXX executable occt-webgl-sample.js
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: vtable for Graphic3d_TransformPers
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Aspect_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Wasm_Window
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: vtable for TopoDS_TShape
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: vtable for TopoDS_TCompound
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Standard_Failure
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Standard_Transient
wasm-ld: error: CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o: undefined symbol: typeinfo for Standard_Failure
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
em++: error: 'D:/Download/emsdk-main/upstream/bin\wasm-ld.exe -o occt-webgl-sample.wasm CMakeFiles/occt-webgl-sample.dir/WasmOcctView.cpp.o CMakeFiles/occt-webgl-sample.dir/main.cpp.o -LC:/PROGRA~2/OCCT/win32/vc14/lib "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKRWMesh.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKBinXCAF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKBin.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKBinL.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKOpenGles.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKXCAF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKVCAF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKCAF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKV3d.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKHLR.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKMesh.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKService.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKShHealing.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKPrim.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKTopAlgo.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKGeomAlgo.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKBRep.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKGeomBase.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKG3d.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKG2d.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKMath.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKLCAF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKCDF.lib" "C:/Program Files (x86)/OCCT/win32/vc14/libd/TKernel.lib" D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/freetype.lib D:/Software/vcpkg/packages/zlib_x86-windows/lib/zlib.lib D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/bz2.lib D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/libpng16.lib D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/zlib.lib D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/brotlidec-static.lib D:/Software/vcpkg/packages/freetype_x86-windows-static/lib/brotlicommon-static.lib -LD:\Download\emsdk-main\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten --whole-archive -lembind-rtti --no-whole-archive -lGL-webgl2 -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export=stackSave --export=stackRestore --export=stackAlloc --export=__wasm_call_ctors --export=__errno_location --export=malloc --export=free --export=__cxa_is_pointer_type --export-table -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=2147483648 --global-base=1024' failed (returned 1)
CMakeFiles\occt-webgl-sample.dir\build.make:146: recipe for target 'occt-webgl-sample.js' failed
make[2]: *** [occt-webgl-sample.js] Error 1
CMakeFiles\Makefile2:81: recipe for target 'CMakeFiles/occt-webgl-sample.dir/all' failed
make[1]: *** [CMakeFiles/occt-webgl-sample.dir/all] Error 2
Makefile:134: recipe for target 'all' failed
make: *** [all] Error 2
emmake: error: 'make install' failed (returned 2)
Mon, 05/09/2022 - 11:31
You cannot build WebGL sample using OCCT libraries built by Visual Studio - OCCT should be built by the same Emscripten SDK as sample itself.
Mon, 05/09/2022 - 13:03
Thanks.
So freetype/tcl are must built by Emscripten?
:(
a little difficult...
Mon, 05/09/2022 - 18:07
Help!
How to build tcl/tk with cmake(by emscripten)?
It's difficult for me.
Thanks.
Tue, 05/10/2022 - 06:35
I have solved the problem above. Thanks! New problem such as:
I has added the harfbuzz libraries:
Tue, 05/10/2022 - 08:29
Solved all the problems!!!