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

Problem using Aquila #55

Closed
waterzch opened this issue Nov 17, 2018 · 2 comments
Closed

Problem using Aquila #55

waterzch opened this issue Nov 17, 2018 · 2 comments
Assignees
Labels

Comments

@waterzch
Copy link

waterzch commented Nov 17, 2018

I compile Aquila step by step as the guide (installation-guides/install-aquila.md) said. But when I use it in QT project, it failed to compile.
Aquila/lib//libAquila.a(SignalSource.cpp.o): relocation R_X86_64_32 against `_ZTVN6Aquila12SignalSourceE' can not be used when making a shared object; recompile with -fPIC
Is it an issue?
How could I fix it?

@PeterBowman
Copy link
Member

You can't just link a static library (libAquila.a) into a shared object unless it's specifically prepared for that use case, see this SO question. To not meddle with the source code of Aquila, instruct CMake to build a shared library instead: cmake .. -DBUILD_SHARED_LIBS=ON. You should see a libAquila.so in your build folder.

If that fails, add the following after these lines:

set_target_properties(Aquila PROPERTIES POSITION_INDEPENDENT_CODE ON)

PeterBowman added a commit that referenced this issue Dec 19, 2018
@PeterBowman
Copy link
Member

To not meddle with the source code of Aquila, instruct CMake to build a shared library instead: cmake .. -DBUILD_SHARED_LIBS=ON.

Successfully tested on a custom shared library that links to libAquila.so. Closing with dd2938d.

@PeterBowman PeterBowman self-assigned this Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants