OS: Windows
Requirement: to build https://github.com/jgaa/restc-cpp using cmake.
The above project needs openssl, zlib and boost.
All good with finding the first 2 but can't find boost libraries.
Have used
file (GLOB_RECURSE boostDirs LIST_DIRECTORIES true C:/path/to/boost/libs/*.lib)
to find all possible directories where the lib files may live.
INCLUDE_DIRECTORIES(${boostDirs})
doesn't help as
set(Boost_DEBUG 1)
reveals that
_boost_LIBRARY_SEARCH_DIRS_RELEASE = has a mind of its own and doesn't use the included directories.
Have looked high (google) and low (the docs), to no avail.
Anybody have the solution to my problem?
All suggestions/workarounds welcome. And thanks in advance!
Related
I've got a source tree with many src directories (lots of use of add_subdirectory), and
I would like to install all of them and be able to use find_package to include them into another project.
After getting mightly confused with install(EXPORT.... , .cmake and config.cmake files,
please could someone tell me the right way of approaching this.
Thanks
My question is almost a direct extension of this one, which asks how to add BOOST to a Yocto SDK. (Adding Boost recipe to Yocto SDK)
I followed the answers to the above link and I can see that the full set of libraries have been compiled, but only a subset of these end up in the distribution. For example, I need certain of the "*-mt.so" libraries, but only some of the single-thread libraries are copied into the final rootfs archive.
Could someone please advise me on how to do this?
I am unfamiliar with Poky, so might have the wrong terminology - apologies!
Kind regards, Kevin
You can use oe-pkgdata-util to find out what you need if you aren't sure. In this case,
oe-pkgdata-util list-pkg-files -p boost
This will list the packages produced by boost recipe with files in them.
If you're looking for something specific, for this case, try something like:
oe-pkgdata-util find-path *-mt.so
Along with Kevins answer, you can always say which files need to be installed. This can be done in the recipe files ( for boost may be add a .bbapend file and write which files you want to install by specifying them in do_install += " ")
I just started teaching myself XLib, and I'm trying to figure out where everything is located. I've found the header files to be located at /opt/X11/include (I'm using MacOS if that's relevant), but I have no idea where I should tell gcc to look for the actual libraries. I know they're somewhere in /opt/X11/lib, but there are so many subdirectories I don't know where to look. Specifically, I'm trying to find the library file(s) associated with X11/Xlib.h. Help would be appreciated. Thanks.
On linux the library is libX11.so (it might be a link e.g. libX11.so -> libX11.so.6.3.0) and it is under the directory /usr/lib64.
Have no issues linking to system frameworks, but I can't ever seem to get CMake to find pre-built frameworks stored in a local directory. Tried various combinations of find_library and link_directories.
link_directories(/path/to/Framework)
find_library(THE_FRAMEWORK
NAMES TheFramework
HINT "/path/to/Framework"
REQUIRED)
target_link_libraries(${PROJECT_NAME} ${THE_FRAMEWORK})
I invariably end up with a NOT_FOUND error.
I believe the issue was that HINT needed to be HINTS
when i search for adding a system call, i get many articles but they seem to be for old versions, it also seems like a trivial process.
But the problem is, the directories that articles suggest does not hold for the version 2.6.31. does anyone know where unistd.h, syscall_table.S and syscalls.h or their corresponding files are?
Thanks in advance.
for unistd.h : $SOURCE_PATH/arch/x86/include/asm/unistd_32.h
for syscalls.h : $SOURCE_PATH/arch/x86/include/asm/syscalls.h
for syscall_table_32.h : $SOURCE_PATH/arch/x86/kernel/syscall_table_32.h
obviously i'm on x86 machine.
On most Linux systems such header files can be found under:
/usr/src/kernels/$KERNEL-VERSION/include/linux/
You need to have your kernel sources installed to be able to do any kernel development though, if that's what're trying to do, since unistd.h is part of the standard gcc library as well.