I compiled and installed libzmq on my Raspberry pi but I can't find the C-binding header file, czmq.h.
I searched the entire file system and only find the libary files in /usr/local/lib.
https://linux.die.net/man/7/czmq
You have to install czmq also, it's a separate library and it is not included with libzmq: http://czmq.zeromq.org
Related
I am working on MacOS and using homebrew to install libraries. The library that I am trying to get working is freeImage which installed just fine using homebrew.
In Clion to link library I edited CmakeLists.txt file to contain:
target_link_libraries(Tutorial_2 freeimage)
I get the following output when trying to compile:
ld: library not found for -lfreeimage
Never had issues with this using linux and not sure what i'm doing wrong here?
First, you need to find the installation path of this library by brew info freeimage. My example is /usr/local/Cellar/freeimage/3.18.0:
freeimage: stable 3.18.0 (bottled), HEAD
Library for FreeImage, a dependency-free graphics library
https://sourceforge.net/projects/freeimage
/usr/local/Cellar/freeimage/3.18.0 (16 files, 29.9MB) *
then, modify your CMakeLists.txt to fix the problem:
cmake_minimum_required(VERSION 3.22)
project(libuv_clion C)
set(FREE_IMAGE_DIR /usr/local/Cellar/freeimage/3.18.0) # set the lib path
include_directories(${FREE_IMAGE_DIR}/include/) # include the lib
link_directories(${FREE_IMAGE_DIR}/lib/) # link the lib
set(CMAKE_C_STANDARD 11)
add_executable(libuv_clion main.c)
target_link_libraries(libuv_clion freeimage)
How can I link libxml on MinGW when using an omnetpp shell?
I am using omnetpp on a windows 10 machine.
My problem happens when I am trying to install the 3rd party package from here
I think that there is a problem in the Makefile failing to locate the libxml library
Following Rudi's answer (following the question) I changed the Makefile libxml path to I/mingw64/include/libxml2 but I still
get a undefined reference to 'xmlFunctionName' error (for many function names)
I tried to isolate the problem and to compile a sample of code from libxml2
Following the compilation guide: using gcc `xml2-config --cflags --libs` -o tree2 tree2.c
I got a fatal error: 'libxml/parser.h' file not found
When I replaced xml2-config --cflags --libs with -I/mingw64/include/libxml2
I got the same error as before undefined reference to 'xmlFunctionName'
what can I do to resolve that issue?
To this specific problem: libxml2 is actually already present as OMNET 5.x also uses it. All dependencies and tools are available in the tools/win64/mingw64 directory. The problem is that (for unknown reasons) the include file of the include/libxml2/libxml folder. The configure script correctly detects this and makes it available in the Makefile.inc as XML_CFLAGS= = -I/mingw64/include/libxml2
This must be added to the compiler flags for each file where you want to use the XML parser. (the library files are in the /mingw64/lib folder) so those are detected and can be used without additional config.
Generally, third party libraries should be available in the /mingw64/include and /mingw64/lib folders. You can either copy them manually there or try to install it with the mingw package manager (however that will most likely ruin your omnet installation as mingw64 is not particularly consistent and it is a rolling release - i.e. this is highly not recommended).
I want to use the Haskell ffmpeg library under windows so I tried to install it via cabal.
After downloading and extracting ffmpeg shared (64bit) version to C:\FFmpeg cabal complained that pkg-config was not installed.
I downloaded it and moved it to the bin folder of MinGw. Now cabal complains that it can not find the pkg-config package libavutil.
First part of the question:
What is a pkg-config package? Is it just the dll that comes with the shared version of ffmpeg?
Second part:
I know pkg-config uses .pc files to describe where to look for packages and it uses the PKG_CONFIG_PATH variable to find .pc files. So how would a .pc file look when the libavutil dll is located in C:\FFmpeg\bin?
PS: The dll in FFmpeg\bin is named avutil-55.dll
Thanks
Problem is actually that my compiler doesn't find the SDL library files. I rounded down possible errors by removing all SDL files, reinstalling SDL and compiling without SDL_image. No help.
Files I copied from SDL-devel-1.2.15-mingw32.tar.gz package:
sdl\include to mingw\include\sdl (I later copied files to mingw\include root as well)
sdl\lib to mingw\lib (3 files: libSDL.dll.a libSDLmain.a and libSDL.la)
sdl.dll and sdl-config to mingw\bin
I installed it via msys, and later manually just to make sure, and also copied same files to corresponding places in msys folder.
The error message:
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lSDL
I have been using a simple make command in msys console, I moved the options for build into makefile to make things easier.
I'm using WinXP, MinGW/MSYS, SDL 1.2.15 and trying to compile fheroes2 source code.
I'm trying to compile a library requiring boost. I was able to make it work on ubuntu but I don't understand why the ./configure can't find boost_thread on Mac OS X. Boost .hpp are located in /usr/local/include/boost and .dylib and .a are located in /usr/local/lib
Here's the log file of configure : http://pastebin.com/KKqareyT
Do you have any idea ?