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 ?
Related
I get this error when I'm using Cygwin on a "makefile":
"boost/filesystem.hpp: No such file or directory compilation terminated."
This is everything that's inside the "makefile":
mnisten: src/main.cpp g++ -Wall -O2 -lboost_filesystem-mt -std=c++0x -o mnisten src/main.cpp
And inside the "main.cpp" file, this is the line of code that the error message is referring to:
#include <boost/filesystem.hpp>
First I tried to put the "boost" folder (containing "filesystem.hpp") inside the "src" folder, but the error message was unchanged, I still got the same error message.
Then I changed the "include" code inside "main.cpp" to:
#include <filesystem.hpp>
I also copied the "filesystem.hpp" file into the root of the "src" folder, and surprisingly this worked. I got a new error, but I got past the "include" part.
I find it very confusing that it I get an error when the file is in a folder, but when it is in the root of the "src" folder it works.
Any suggestions on how I can get it to work when the file is inside the "boost" folder?
(I downloaded the the "filesystem.hpp" since it was not included)
To find the cygwin package that contains a given file you can use cygcheck -p
$ cygcheck -p boost/filesystem.hpp
Found 6 matches for boost/filesystem.hpp
libboost-devel-1.60.0-1 - libboost-devel: Boost C++ libraries (installed binaries and support files)
libboost-devel-1.60.0-2 - libboost-devel: Boost C++ libraries (installed binaries and support files)
mingw64-i686-boost-1.60.0-1 - mingw64-i686-boost: Boost C++ libraries for Win32 toolchain (installed binaries and support files)
mingw64-i686-boost-1.60.0-2 - mingw64-i686-boost: Boost C++ libraries for Win32 toolchain (installed binaries and support files)
mingw64-x86_64-boost-1.60.0-1 - mingw64-x86_64-boost: Boost C++ libraries for Win64 toolchain (installed binaries and support files)
mingw64-x86_64-boost-1.60.0-2 - mingw64-x86_64-boost: Boost C++ libraries for Win64 toolchain (installed binaries and support files)
so you need to install libboost-devel as you are not crosscompiling for mingw64.
Similar for
$ cygcheck -p opencv/cv.hpp
Found 1 matches for opencv/cv.hpp
libopencv-devel-2.4.11-1 - libopencv-devel: Real-time computer vision library (development) (installed binaries and support files)
Probably you don't have any boost installed in your system. I got this error and solved by installing it.
sudo apt-get install libboost-all-dev
I'm trying to build libmcrypt library to use it with my project. It happened so, that they do not provide any kind of assistance.
First I've faced a problem with -no-undefined flag for gcc which is not further supported. I've replaced -no-undefined with -Wl,-no-undefined in makefiles and it does the trick.
But anyway I'am having problems. Lib is builded in .a files. I can see them in my C:\MinGW\msys\1.0\local\lib folder (it is analogue for /usr/local/lib folder in MinGW). But I need .dll library, not static .a .
So: what else must I change in makefiles to make MinGW build dll with header and debug info for it?
I have looked through the file library for boost and it does have filesystem but it doesn't have anything for system. However, when I run the code without including system, I get an error saying filesystem needs the boost system to run properly. I am running Code::Blocks 10.05 with a GNU GCC compiler. I have tried including -lboost_system in the links for my project but it couldn't find system either. How can this be fixed?
I am using XCode 3.2 and have installed boost using the MacPorts project (both release and debug) however I am at a loss to get my application to link with boost::filesystem
I have set my library search path to /opt/local/lib but I still get unresolved references when linking the project.
I noticed in another post to add -lboost_system to the "other linker flags" but when I do this I get - libboost_system.dylib, file was built for unsupported file format which is not the architecture being linked (i386).
Is MacPorts not installing the right libraries or am I missing something else?
Martin
You didn't indicate what OS version you are build it with. My guess is MacPort defaults to x64 when building and installing ports. Uninstall boost from MacPort then re-install it with universal variant.
%% sudo port uninstall boost
%% sudo port install boost +universal
It is possible that the name of the library is not exactly boost_system but maybe boost_system-mt (the -mt is because boost was compiled with thread safety) or even some other suffix.
To be sure, you can look up the name in /opt/local/lib:
find /opt/local/lib -name "libboost_system*"
i try to compile a program with cmake, but I got stock with this error:
Unable to find the requested Boost libraries.
Boost version: 1.34.1
Boost include path: /usr/include
Detected version of Boost is too old. Requested version was 1.37 (or
newer).
The following Boost libraries could not be found:
boost_program_options
boost_filesystem
No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
I installed already the new boost package under /home/dev/boost_1_45_0.
But always when I try to run cmake again I get still the same error.
I also set
export BOOST_ROOT=/home/dev/boost_1_45_0
But when I execute cd ${BOOST_ROOT} I'm in the right folder.
Can anybody help me? Thanks!
Try to delete your build tree, and then run:
cmake -DBOOST_ROOT=/home/dev/boost_1_45_0 path/to/src path/to/build