Skip to content
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

Is there a guide on integrating this with game engines #35

Open
EmmanuelMess opened this issue Feb 9, 2022 · 2 comments
Open

Is there a guide on integrating this with game engines #35

EmmanuelMess opened this issue Feb 9, 2022 · 2 comments

Comments

@EmmanuelMess
Copy link

I am using Godot right now.

@jhasse
Copy link
Owner

jhasse commented Feb 9, 2022

This is the only one I know of: https://github.com/jhasse/poly2tri/wiki/Examples-C%23

Feel free to add one for Godot to the Wiki.

@EmmanuelMess
Copy link
Author

EmmanuelMess commented Feb 20, 2022

I am getting:

g++ -o demo/bin/x11/libgdexample.so -shared godot-cpp/src/gdexample.os godot-cpp/src/gdlibrary.os -Lgodot-cpp/bin -Lpoly2tri/build -lgodot-cpp.linux.debug.64 -lpoly2tri
/bin/ld: poly2tri/build/libpoly2tri.a(shapes.cc.o): relocation R_X86_64_PC32 against symbol `_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
scons: *** [demo/bin/x11/libgdexample.so] Error 1
scons: building terminated because of errors.

Is there an option to add a compilation setting for Godot that has -fPIC?

Adding set(CMAKE_POSITION_INDEPENDENT_CODE ON) to CMakeLists.txt works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants