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

linux: Failure to link, POSITION_INDEPENDENT_CODE is not being recognised. #13

Open
hosaka opened this issue Sep 13, 2017 · 0 comments
Open

Comments

@hosaka
Copy link

hosaka commented Sep 13, 2017

This is probably a duplicate of #12. I've had luck with using ofxCMake addon for the most part. Apart from the linking stage, even though there lines in configLinux.cmake

set_source_files_properties( ${OF_SOURCE_FILES} PROPERTIES COMPILE_FLAGS "-std=c++11 -Wall -fPIC" )
set_target_properties( of_shared PROPERTIES POSITION_INDEPENDENT_CODE TRUE )

The linker fails with the following errors along the lines of:

/path/to/lib.a: can not be used when making a shared object; recompile with -fPIC

I have additionally tried setting PIC using some options I found on stackoverflow

set(POSITION_INDEPENDENT_CODE ON)

But this made no difference. Any suggestions?

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

1 participant