pageldev / libOpenDRIVE

Small, lightweight C++ library for handling OpenDRIVE files
Apache License 2.0
368 stars 134 forks source link

main.js cannot read the newly added c function #79

Closed ctwu0314 closed 10 months ago

ctwu0314 commented 12 months ago

Hi Guys: I met a problem about main.js cannot read the newly added c function. Can anyone help me?

I try to add a c function (get_lane_type) to main.js, main_js RoadNetworkMesh_cpp RoadNetworkMesh_h ViewerUtils_cpp Embind_cpp

compile successfully according to the instructions in README.md, and copy the file to Viewer compiler_result

But when the webpage executes it shows an error main.js:409 Uncaught TypeError: odr_lanes_mesh.get_lane_type is not a function at animate (main.js:409:46) execution_result

The modified file is as follows modified_files.zip

pageldev commented 10 months ago

It looks like the function get_lane_type also needs to be added to Embind.cpp.

Closing due to inactivity and because this is more of an Emscripten related question