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

Compilation flags lack -fPIC on Linux #8

Open
f35f22fan opened this issue Jul 8, 2020 · 0 comments
Open

Compilation flags lack -fPIC on Linux #8

f35f22fan opened this issue Jul 8, 2020 · 0 comments

Comments

@f35f22fan
Copy link

f35f22fan commented Jul 8, 2020

Hi, thanks for this very useful project!

On Linux (not sure about Windows or Mac):
g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -g
should be
g++ test.cpp $(pkg-config --cflags --libs Qt5Core) -fPIC -g

because otherwise the compiler complains:

error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."

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