pcl icon indicating copy to clipboard operation
pcl copied to clipboard

EMSCRIPTEN EXPERIMENTAL : warning: unresolved symbol: _ZN3pcl7console5printENS0_15VERBOSITY_LEVELEPKcz

Open Samsy opened this issue 8 years ago • 10 comments

Hello there, I'm currently working on an experimental Emscripten build so that lib can work on the web straight.

I did compiled every librairies / dependencies using emscripten before-hand. I'm really close to get it working with webassembly.

I just got trouble figuring what this error could be :

warning: unresolved symbol: _ZN3pcl7console5printENS0_15VERBOSITY_LEVELEPKcz

If some of you have a clue ..

Many thanks

Samsy avatar Jun 10 '18 13:06 Samsy

Something weird is going on with our print functions in your environment. Looking at your previous report in #2334 I got an idea that you can try. Prepend :: to the namespace specification in each of these lines. E.g., the first line should become:

#define PCL_ALWAYS(...) ::pcl::console::print (::pcl::console::L_ALWAYS, __VA_ARGS__)

taketwo avatar Jun 10 '18 13:06 taketwo

Hey hello, thank you very much to help ! capture d ecran 2018-06-10 a 14 47 11

Still getting the error though !

Samsy avatar Jun 10 '18 13:06 Samsy

Are you still getting those compilation errors from the other issue, or is this a linker error?

taketwo avatar Jun 10 '18 13:06 taketwo

Only a linker error !

Samsy avatar Jun 10 '18 14:06 Samsy

What did you do to resolve the compiler errors?

Please give more context for the linker error (actually, the line you posted says "warning") . When exactly does it occur, what is your linker command.

taketwo avatar Jun 10 '18 15:06 taketwo

I got it.. Emscripten is a really weird compiler though. I had to play a bit with format export of those static library and enable PCL_NO_PRECOMPILE for some reasons.

capture d ecran 2018-06-10 a 15 52 45

I successfully managed to get an EMSCRIPTEN build of PCL working in a browser

Samsy avatar Jun 10 '18 15:06 Samsy

@Samsy Hi~Samsy,could you show me your Emscripten build process?

plusice avatar Mar 21 '19 03:03 plusice

could u share your wasm in github?

naah69 avatar May 21 '22 02:05 naah69

@naah69 @plusice I built PCL using WebAssembly and now it works in the browser ✌️: https://github.com/luoxuhai/pcl.js

luoxuhai avatar Aug 26 '22 00:08 luoxuhai

https://github.com/luoxuhai/pcl.js

omg! that is great! thanks for your code!

naah69 avatar Aug 26 '22 06:08 naah69