Can't find Boost 1.34.1 signals lib - c++

I am trying to compile a CIGI's MPV for OpenSceneGraph using cmake. It's not very recent, it requires boost 1.34.1. So I downloaded it, cmake couldn't find the boost for a while. I put set(Boost_DEBUG 1) in the FindBoost.cmake and, amongst other things, got the following:
Searching for SIGNALS_LIBRARY_RELEASE: boost_signals-vc100-mt-1_34_1;boost_signals-vc100-mt;boost_signals-mt-1_34_1;boost_signals-mt;boost_signals
Searching for SIGNALS_LIBRARY_DEBUG: boost_signals-vc100-mt-gd-1_34_1;boost_signals-vc100-mt-gd;boost_signals-mt-gd-1_34_1;boost_signals-mt-gd;boost_signals-mt;boost_signals
Could not find the following Boost libraries:
boost_signals
Now I am trying to find this library. This instruction suggests I either build them myself or download them from a link, which is now broken. I couldn't built it with bjam (bjam --toolset=msvc stage) I kept getting error's like:
libs\program_options\src\cmdline.cpp(198) : error C2668: 'boost::bind' : ambiguous call to overloaded function
and
unknown compiler version please run the configure tests and report the results. Then I downloaded this installer which had only dll of needed library, release I assume and I need debug as well.
So a couple of questions presents itself:
1.Do I keep trying to compile boost, if so any tips?
2.Where do I get the libs I need?
3.I am assuming I need the .lib files not the .dll's, am i right?
I am really confused by now, please point me in the right direction.

Related

How to compile Quantlib via Xcode?

I am trying to install QuantLib on my Mac running OSX 10.11.6. Installed Boost 1.59 via MacPorts and then followed these instructions.
I used these additional environment variables
./configure --with-boost-include=/opt/local/include/ \
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/ \
CXXFLAGS='-O2 -stdlib=libstdc++ -mmacosx-version-min=10.6' \
LDFLAGS='-stdlib=libstdc++ -mmacosx-version-min=10.6'
and then make && sudo make install.
However when I run the Bermuda Swaption test it gave me the same error described here.
Little premise: I don't know anything about C++. I need QuantLib to work on Python. So I read carefully the answer by SmallChess and tried to solve it by myself. As I read in his answer
You can't just compile BermudanSwaption.cpp and hope everything would be fine. You have to compile the entire QuantLib library and link with the generated library files. Please google "compiling and linking C++" for more information.
By far, the easiest way to make it happen on Mac is to do it with Xcode. You will need to create a new Xcode project, and import the entire Quantlib project files into it. Next, you will need to create a main() function. Xcode does the compiling and linking for your automatically.
This is what I exactly did:
created a new project in Xcode (version 8.2.1)(file/new project/Command Line Tool/"HelloWorld"/Documents/create)
selected Targets, Build Phases and Link Binary With Library. Added libQuantLib.0.dylib
set libstdc++(GNUC++ standard library) as C++ Standard Library in Build Settings
Modified Header Search Paths to include: /opt/local/include/, and Library Search Paths to include: /opt/local/lib
C++ Language Dialect is set on Compiler Default.
Dragged the ql folder onto the left window of the Xcode
Now, I managed to copy a simple code which includes the library and even if there are many warnings, it runs. Still when I run on the Terminal the command for the Bermuda Swaption test I get the same error. What am I doing wrong?
Additional info (may or may not be useful): if I change the C++ Standard Library setting on Xcode to libc++, I get on Xcode the same error I get when i try the Bermuda Swaption test (ld: symbol(s) not found for architecture x86_64).
Any help would be very much appreciated
Regards
EDIT: you can find a picture of the code at https://i.stack.imgur.com/1zhjO.png

lapack complains about libgcc_s_sjlj-1.dll

I am trying to write a program that uses armadillo in Visual Studio. I downloaded Prebuilt libraries for lapack and blas from http://icl.cs.utk.edu/lapack-for-windows/lapack/. I also downloaded MinGW and added C:/MinGW/bin to my System PATH. C:/MinGW/bin has libgfortran-3.dll and libgcc_s_dw2-1.dll which are what the lapack documentation states is needed. However, when I attempt to run my program I get a runtime error stating that the program can't run because libgcc_s_sjlj-1.dll is missing. This dll does not come with MinGW and I tried downloading multiple versions. How can I get rid of this error?
The MinGW-w64 project have something called "personal builds". One of them is "sjlj". The library is built using a gcc compiler from this personal build.
Assuming that it was used the current latest version (6.3.0) and win32 threads the you can find the toolchain binaries here. If not, you can check some other versions.
You can either extract the dll you need or extract it and add it to your system path.

Link error with libCGAL-vc120-mt-sgd-4.5.1.lib and cant seem to find or build it

Hey I'm a bit of a noob when it comes to CGAL and CMake but I've gotten to the point where everything seems to be running except for this link error:
LINK : fatal error LNK1104: cannot open file 'libCGAL-vc120-mt-sgd-4.5.1.lib'
trouble is I cant seem to find a reference to this lib anywhere am I building wrong?
I can see a 'libCGAL-vc120-mt-gd-4.5.1.lib' in my cgal lib dir which links fine. I'm not sure what the difference between gd and sgd is though and how to make it.
Any help is appreciated.
The naming libCGAL-vc120-mt-sgd-4.5.1.lib shows that you are compiling a program, that uses CGAL, using the linker flag /MTd (Debug, and link the C++ runtime statically).
The CMake scripts of CGAL do not support linking with the static runtime. They only support /MD or /MDd. I suggest you change that linker flag in your setup.
Alternately, you can try to change the CMake scripts of CGAL, but I do not recommend that solution.

How to build MinGW binaries in OpenCV for Windows?

I can't build MinGW binaries in OpenCV. I am using Code::Blocks and need to include OpenCV libraries in my C++ project.
I searched the web for hours for a solution, but i can't find any. I tried CMake, but get the following error:
CMake Error: CMake was unable to find a build program corresponding
to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably
need to select a different build tool.
I searched the web for this error, but all the proposed solutions are too advanced for me.
Is there a way to build MinGW without CMake? My reason for not want to use CMake is that it seems like i will get too much trouble with it. If it's not possible (or more difficult) to not use CMake, is anyone knows how to get around with aforementioned error?

How on earth do i use Boost?

I'm reasonably new to C++, and I was going to mess around with threading for my Tamagochi game, however it seems that everything says I should get Boost for that.
So my question is, how on earth do I install it?
I've found ways of using it by doing the whole "Add the path in the properties" thing. And that works, however I'm guessing that if I use that way, I wont be able to compile and release it afterwards?
I also tried using BlueGo from vertexwahn.de.
but I have no idea what it actually does. I get the whole "It compiles the libraries for you" thing but, how do I use them then?
Should they work from within VS2012 without further tweaking, or do I still need to add in the path's in properties?
I just want to use the threading from Boost, and then build the project and send to a friend.
I was going to mess around with threading...
If my reading of MSDN is correct, Visual Studio 2012 appears to support the new threading features of C++ 11. With this in mind, you don't need to install Boost. You can just use the standard <thread> header instead.
Some boost modules have to be built.
For Windows, you have to use bjam.exe to build your libraries.
And bootstrap.bat will build you bjam.exe
From your unzipped boost directory :
bootstrap.bat
bjam.exe release debug toolset=msvc address-model=32 --build-type=complete
bjam.exe release debug toolset=msvc address-model=64 --build-type=complete
And check your stage/lib for *.lib, *.dll
(You may have to clean your stage/lib directory between two bjam commands)
Then, add include directory and library directory to your VS project.
Needed libraries will be automatically linked (you do not have to tell VS to use boost thread for example), boost use pragma to find out what is needed. It doesn't work for Linux though.
As previously stated, VS2012 already handle threads, but boost is much more than that and I strongly recommand using it for whatever you want to code.
With asio from boost, you can even make thread pool : see recipe
download boost
compile boost (go to the boost directory, call
bootstrap and after this is finished call b2)
decide which part of boost to use
add the main boost directory to your include path and the lib (with default it is in stage - just search for the lib files) directory to your linker path
make sure that you link boost thread dynamically (there may be problems if you link statically)
program