I used Homebrew to install gphoto2 and libgphoto2 for use in a camera-control application using C++. I have confirmed that header files were linked in /usr/local/includes:
Screencap of includes folder on my system
Based on the sample code available at https://github.com/gphoto/libgphoto2/tree/master/examples, it seems like I should be able to use includes such as #include <gphoto2/gphoto2.h> to access the header files, but that approach has failed using both Clang and Xcode as the compiler. The files are not found. What am I doing wrong?
Related
I trying to build Tensorflow r1.0 for c++
I was able to compile the libtensorflow.so but not all the headers generated.
All the ops headers missing except from standard_ops.h and const_ops.h which include in them all the ops headers that missing.
Im using Ubuntu 16.04.
Code for most ops is generated during the build. When using bazel, you should fine the generated header files in: bazel-genfiles/tensorflow/cc/ops, e.g., bazel-genfiles/tensorflow/cc/ops/math_ops.h.
Hope that helps.
If you don't mind using CMake, you can use tensorflow_cc project. It builds and installs TF C++ API for you, along with convenient CMake targets you can link against.
I have been looking for Qt USB solution and came across this QtUSB wrapper, which looks the most promising. It wraps around libusb 1.0 And upon examining the source code in the /src directory, I see a reference to
#include <libusb-1.0/libusb.h>
I have not compiled libusb not I have it installed using apt-get on my Ubuntu machine. I would like to have a solution, where all source files are included in my master solution and I compile this at once on all platforms I need.
I.E. I do not wish to compile the 3 modules separately and link to each other, rather I'd like to include them into my solution and build all at once.
How should I proceed? Whatever I try is giving me some errors with some components not present or some classes not defined. I placed all QtUSB files into /QUSB directory in my project and I imported all files into Qt Creator. I then did the same for /QUSB/libusb-1.0 files.
The rapidjson build within Xcode 5.1.1 is already old.
I found the FileStream class which is already deprecated and there is no FileReadStream.
Anyone know How to update rapidjson in Xcode 5.1.1?
rapidjson is a header only library, you should be able to just grab the latest version from the rapidjson git repository and place the files in your project/system's include path.
Note that this repository is in active development and I don't see any official stable releases yet, so you may also want to check out its old home at google code. This is discussed in this issue on the github repo.
I'm not sure about updating the libraries that come with Xcode specifically. You should be fine with just adding the rapidjson header files somewhere on your machine - either with the rest of your include files or in a directory which you specify to GCC as being an include directory using the -I(include directory here) command line option.
For example:
-I"external/includes" if you place the rapidjson files in the relative directory external/includes/rapidjson and use #include <rapidjson/(rapidjson file name)> when including a rapidjson file.
If you do either of those GCC will look there before looking in the system include paths (where XCode most likely installed rapidjson), and use the newer files you provided. I don't have any personal experience with LLVM, but I'd assume they would handle include files the same way (though the command line option may be different).
EDIT : OK, I fixed the issue I outlined originally with not being able to find headers for curl and cryptlib. But, after fixing these issues by installing curl and libcryptopp with macports, I encountered a zillion errors in the associated files. I'm marking this answer as complete though
I'm trying to add the Mega.co.nz client SDK to an Objective-C XCode project. The client is written in C++, with .h header files and .cpp implementation files. XCode recognizes these as needing to be compiled with the C++ compiler (I presume).
At this point all I want to do is get the project to compile with no errors. At this time I am getting two errors, both of them on some #include statements.
#include <curl/curl.h> 'curl/curl.h file not found'
#include <crypto++/cryptlib.h> 'crypto++/cryptlib.h file not found'
I think it has something to do with me not having the correct components installed or not referenced correctly within XCode. Should I be linking against a static library to get these headers? Is there a project setting I need to change to search in a specific directory to find these files?
If you can help, thank you very much.
Xcode cannot find the above headers. This is because they are not in the include path. This is most likely to one of two reasons.
You don't have the above libraries installed.
You haven't added the correct path to your build config (like /opt/local/include if you are using macports)
Solutions to try:
Make sure that you actually installed Curl and cryptopp (crypto++) (i.e. compiled them yourself or used a package manager like macports or brew)
Make sure that your build includes the paths to these files (Look at the "header search paths" in xcode project settings
PS. Do not think about linking or such - this has nothing to do with it. You will run into these problems after you've actually compiled the code - i.e. in the linking phase :)
Some time ago I installed gloox library with the command sudo apt-get install libgloox-dev.
But it is not working in netbeans, for example. I noticed that there are only .h files (with only function declarations) in /usr/include/gloox directory. Need your help...
You need to configure your project dependencies in order to use a library.
Are you able to access Gloox files using <> ? If yes the environment variable is set correctly (should be done automatically in Ubuntu)
The library (.so file) will be in /usr/local/lib. You need to link the project against it in your makefile. On netbeans I think it's on project properties->c++ compiler. Personally, I use Cmake to generate my makefiles
Try to download library from http://camaya.net/gloox/download and follow installation instructions.