LiangliangNan / PolyFit

Polygonal Surface Reconstruction from Point Clouds
https://3d.bk.tudelft.nl/liangliang/publications/2017/polyfit/polyfit.html
GNU General Public License v3.0
723 stars 121 forks source link

relocation R_X86_64_TPOFF32 against symbole `_ZN6soplex5Param9s_epsilonE' can not be used when making a shared object; recompile with -fPIC #15

Closed jihanemastane closed 5 years ago

jihanemastane commented 5 years ago

Hello, I want to thank you for sharing this work.

I get this problem when I want to build my inside PolyFit project, image It says that the reference to glMaterielfv is not defined. I guess the problem is this line in the

CMakeLists.txt : link_directories( ${PROJECT_NAME} basic math model method renderer 3rd_QGLViewer-2.6.3)

[target_link_libraries didnt work , I had an error saying that it can't find the libraries, that's why I changed it to link_directories and now I have the problem on the picture]

LiangliangNan commented 5 years ago

Hi, Thanks for reporting this issue. Now it has been resolved. Grab the new code and you should be able to compile and run PolyFit. The error was about "Generate position-independent code (PIC)" on Linux. For more information, you can have a lot at here https://stackoverflow.com/questions/5311515/gcc-fpic-option

Please let me know if it still doesn't work.

Best, Liangliang