-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link errors when compiling cpp file with emcc -s USE_BOOST_HEADERS=1 in Windows #3
Comments
I have found that Locale library is not header-only so it should be compiled as per Boost documentation. How can this be done with emcc so that the ported library can be linked? https://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#header-only-libraries |
I was wrong, I think Locale should work with headers only flag because there is a locale.hpp file. Maybe it is missing in the port? Is there any way to add it to the compilation? (I have tried with -I but it doesn't work either). |
If the library was header-only then you wouldn't get link errors. Undefined symbols at link time mean you are missing some compiled code. The |
Hi Guys, @twopelu Did you ever get this working? I am trying to use boost-locale but as you specified some libraries unlike for example unordered_set (which I succeeded in) are not header only libraries.... however they are provided by the port which in that case is a bit strange. @sbc100 I am trying to accomplish this all with cmake and as such will need to run cross-platform. I don't know how I would go about modifying that boost_headers.py file to accomplish getting these non-header only libraries to work in WASM. Can you provide any help in this? Sincerely, |
We try to avoid using cmake in It could be the you will want to avoid |
Hi @FrozenSource, I gave up, I was not able to make it work, but I would like to get back to it if somebody finds the way :-) |
I'm trying to compile a cpp file to make some tests with the Boost library port for Emscripten in C++ but I get link errors when trying to compile it in Windows with the emcc command.
I think I'm missing some includes or links but I can't find the way to make it work and I can't find any documentation except the Emcscripten guide:
https://emscripten.org/docs/compiling/Building-Projects.html#emscripten-ports
https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-link-against-system-libraries-like-sdl-boost-etc
I have seen other posts with solutions for cmake but for for plain emcc in Windows.
Code
https://www.boost.org/doc/libs/1_48_0/libs/locale/doc/html/hello_8cpp-example.html
Emcc
emcc boost_suite.cpp -s USE_BOOST_HEADERS=1 -s LLD_REPORT_UNDEFINED -o target/boost_suite.html
Errors
The text was updated successfully, but these errors were encountered: