Skip to content

CMake with emscripten build - undefined symbol: _embind_register_class #19973

Closed Answered by sbc100
brandonmpetty asked this question in Q&A
Discussion options

You must be logged in to vote

I highly recommend using ninja rather than make when using cmake. You can do this -G Ninja on the cmake command line. One of the advantages of using ninja is that when a command fails (such as the link command in this case) , it shows you the failing command. As it stands you cannot see the em++ command that failed.

I'm imagining the problem is that --bind is not being specified as a linker flag. I think you need to move most those flags from COMPILE_FLAGS to LINK_FLAGS. Only -O3 -std=c++17 looks like compile flags to me.

(If you want to keep using make then I think you can run with cmake --build build --verbose to have to output the full command lines).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonmpetty
Comment options

You must be logged in to vote
2 replies
@sbc100
Comment options

@brandonmpetty
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants