I'm trying to use the C client library of http://sphinxsearch.com in my project. It compiles fine on ubuntu using libsphinxclient-dev package
However when I try to compile it on debian sid, it complains that the header sphinxclient.h is missing, and I can't find any package providing this header.
Is there any "clean" way to solve this problem ?
Seems libsphinxclient is not included in Debian upstream and there isn't a separate package.
You can grab the deb packages from Sphinx website,libsphinxclient is installed in /usr/share/sphinxsearch/api/libsphinxclient (you might need to copy the header to include folder or add this folder to path).
Related
I've downloaded the portaudio codebase and compiled it fully with source, and installed it to my system with these commands:
./configure
make
sudo make install
But XCode is complaining to me, even when I put -lportaudio in the Other Linker Flags for the project settings.
I've researched this problem and tried whatever I could find on Stack Overflow, but there was no decisive answer that would work for me. Any advice on how to fix this?
I'm using an older version of XCode and haven't bothered looking at how the interface might have changed in the newer versions, but this is generally solved for me by modifying the User Search Paths under your project settings. Look at the screenshot, add /usr/local/include to Header Search Paths and make Always Search User Paths "Yes." That should do the trick
Edit:
One more thing to note, this is only /usr/local/include because that's the default install directory for the portaudio.h file in the portaudio build (as it is with many libraries).
If you have a different prefix other than /usr/local/include, add that instead.
I am using Mac OS X 10.8 with Xcode. I have installed the jansson library, with the following commands:
./configure
make
make check
sudo make install
Everything went fine and the library installed correctly. I have created a smple .c file with a text editor and tried to include the <jansson.h> file. I builded everything and it gave no errors, meaning that the library is installed on my system.
Now, Xcode doesn't find the library at all, saying that <jansson.h> is not found. I have tried to restart my Mac, but nothing happens. If anyone knows a possible solution, I will be grateful. Thanks!
I resolved the issue, by going under Build phases, and searching for HEADER_SEARCH_PATH. Then I changed the search path label with /usr/local/include, where the library was installed.
In my project I want to use a freeglut library from the unofficial opengl sdk.
I used Premake to generate build files for vs2010. Then I built all libraries (debug). In my project I set Additional Include Directories, Additional Library Directories for the freeglut. In additional dependencies I added freeglutD.lib.
In the code I just include a freeglut header. When I want to run the program I get an error:
>LINK : fatal error LNK1104: cannot open file 'freeglut.lib'.
The freeglutD.lib is the only file in sdk/freeglut/lib. There is no freeglut.dll and freeglut.lib in sdk.
Earlier I was using freeglut 2.8.0 MSVC Package from link which is linked dynamically (contain freeglut.dll) and everything works fine.
What is wrong ?
My guess is that you forgot these lines from the documentation on using the SDK:
You will also need to add some #defines to your command line. These are:
FREEGLUT_STATIC
_LIB
FREEGLUT_LIB_PRAGMAS=0
You need that FREEGLUT_STATIC to let GLUT know that it's linking statically. Otherwise it looks for a DLL.
I had an older project from VS12 and got the same LNK1104 error when trying to build it after upgrade in VS15. All I had to do to fix this was run Package Manager Console (Tools - NuGet Package Manager) and type in:
Install-Package freeglut
Note, that I have reference to glew.h and freeglut.h in one of my header files like this:
#include "..\packages\nupengl.core.0.1.0.1\build\native\include\GL\glew.h"
#include "..\packages\nupengl.core.0.1.0.1\build\native\include\GL\freeglut.h"
I want to build some package from source (e2fsprogs to be more concrete) and install its header files to my system. After that I will delete the build tree so it will not be accessible anymore. What is the right way to do this?
When I want to install program, I make simply:
$ ./configure
$ make
# make install
What are the equivalent actions when I want to install headers?
For e2fsprogs, quoting verbatim from the INSTALL file shipped with the sources:
7) Install the include files and libraries
You can run `make install-libs' to install the include files and
libraries. Please note that this installation is not needed for the
programs to work. It is only needed if you expect to develop other
programs using the libraries or if you want to compile other program
using these libraries (like the 4.4BSD dump and restore port).
More generally though, when I want to find out what is the 'proper' way to install something that has worked for others, I look at:
What the package looks like, in my favourite distro
How the package is built for my favourite distro
I'm a complete beginner to Apple's Xcode, but I have followed the Xcode documentation and the advice of a few related questions without success.
I installed GMP to /usr/local/bin, wrote a short program using the library, and compiled with gcc main.c -lgmp. It compiled with no warnings or errors, and the executable worked flawlessly.
I started a new Xcode project (Command Line Tool; Type: C), copied the code to the newly created main.c, and opened the project build settings. From there I set Linking > Other Linker Flags to -lgmp and Search Paths > Library Search Paths to /usr/local/bin. However, the build fails with the preprocessor error "Gmp.h: No such file or directory".
I have tried almost every header imaginable:
#include "gmp.h"
#include <gmp.h>
#include "gmp"
#include "libgmp.a" . . .
This has been my main obstacle over the last three months which has prevented me from learning C. Any help leading me to an eventual solution would be greatly appreciated.
There's a few things you have to set up in your Xcode project. For example, I have gmp installed in /opt/gmp/5.0.2 and I will use that as an example. The actual library is installed into /opt/gmp/5.0.2/lib and the header files into /opt/gmp/5.0.2/include. When installing the library setting the --PREFIX flag to /opt/gmp/5.0.2 would handle this automatically. If you don't set this flag the prefix is usually set to /usr/local by default.
The Other Linker Flags looks right, it should be the name of the library.
Set the Header Search Path to the include directory, in my case /opt/gmp/5.0.2/include.
Set the Library Search Path to the lib directory, in my case /opt/gmp/5.0.2/lib.
Since the header search path has been set, you should now be able to include the header file like this:
#include <gmp.h>
Of course, replace /opt/gmp/5.0.2 with the PREFIX path you used when you installed gmp.
Lastly, you typically don't install libraries to /usr/local/bin, you would install to /usr/localand let any binaries be installed into bin while libraries like these would be installed into lib. Of course any path scheme would work, I usually recommend /opt/<project-name>/<version-number> since it allows me to keep better track of what I have installed and have multiple versions of the same libraries and tools without having to deal with collisions.
I have updated my system from snow leopard to mountain lion and had to install gmp.
First of all I have installed Xcode CommandLineTools set.
Secondly, installed Homebrew. Then with it I have done steps in this topic: https://apple.stackexchange.com/questions/38222/how-do-i-install-gcc-via-homebrew
In my last step, made changes to an xcode project as colleague Marcus Karlsson told.
It's finally working! Very big Thank You :)