We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

gmp library

asked 2019-06-12 00:17:54 +0300

meolic gravatar image

I have a nice math library in C, it can be compiled for Linux and Windows using gcc or Visual Studio. The only external dependency is gmp (GNU arbitrary precission library). Now, I want to create a native, QML based app for SailfishOS phone to exploit the interesting functionalities of the library (for those really curious, my app should demonstrate Quine-McCluskey minimization of Boolean functions).

I have some experiences with Qt applications (tried a MeeGo app long time ago), but never used external libraries. Is it possible to use external libraries (e.g. gmp) in SailfishOS apps? I have simply copied the library source code into a Sailfish project and I can see, that all includes are "unknown":

#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <gmp.h>

Anybody can help me?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-06-12 13:09:24 +0300

You need to install gmp-devel in the target to get the header files for GMP.

You can do this by adding BuildRequires: gmp-devel in your spec file to build your rpm. Or log into the SDK with ssh and do it by hand with: sb2 -t SailfishOS-3.0.3.8-armv7hl -R zypper in gmp-devel (adjust the target name for your needs and installation).

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-06-12 00:17:54 +0300

Seen: 233 times

Last updated: Jun 12 '19