Does anyone know where I can get a easy to build version of Boost with Lib C++ for iOS ?
I've tried Boost Framework and it didn't like my project as its in C++ 11. I've tried Boost-iOS but it didn't want to compile. It wasn't happy.
Build boost library using this a-coding xcode project. it worked for me, managed to build 1.44 boost c++ with this tool.
also this updated verion of boostoniphone allows to create a library using the most recent version.
ofxiOSBoost: Boost 1.57.0 - iOS - libc++
See: https://github.com/danoli3/ofxiOSBoost
arm64, armv7, i386, x86_64` Boost 1.57.0 or 1.56.0 libc++ / std=c++11
Makefile scripts to build yourself (very easily)
Can build in libstdc++ or libc++
Multiple releases
Related
Lately I've been experimenting with the Allegro game library, but I'm having some trouble setting it up in the following scenario:
I would like to create a cross-platform project (for at least Linux and Windows binaries, preferably also OS X) using CMake that utilizes the Allegro game library, but is able to build using MSVC instead of MinGW for the Windows Binaries.
I tried linking statically to the MinGW standard libraries, but the supplied Allegro binaries for MinGW are still dynamically linked, so I'd rather just use the proper Windows compiler.
Does anyone know if it is possible to extract the binaries from the Nuget package or if there's a more proper way to use MSVC and Allegro while still maintaining a cross-platform source code?
I'd prefer not having to build Allegro from source, but if I have to, any links to guides would be helpful.
I regularly use Code::Blocks and MinGW for my C/C++ projects. I would like to be able to use OpenCV, since it has a nice library for computer vision projects. They have dropped support for MinGW. I have heard you can build it on your own somehow, but I have no experience doing this with 3rd party libraries. Can someone explain how to build it in a simple way for MinGW?
There is, or at least there was at least until 2.4.6, precompiled version of opencv that works out of the box with mingw as long as you use the dw2(standard) version of mingw.
since i needed sjlj support i had to build my own version of openCV 2.4.6
I did he following - i am pretty sure it will work for the current openCV version as well
Setup your preferred Mingw Environment - i would strongly recommend to use gcc 4.5 or newer
Intstall Msys
Intall Cmake - you can get a binary package
Start the Cmake GUI
Select the openCV source folder
Click Configure and select MSYS-Makfiles
Errors in the first run of Configure might be resolved if you run Configure again
Click Generate
use MSYS make to run the generated makefile
Copy all desired libraries and include files to your mingw-installation or your project
I'm trying to include a recent version of OpenCV into an existing iOS project and am having linker errors because my XCode project is set to use libstdc++ and not libc++ / C++ 11 support.
I have seen several other people who have fixed their errors by enabling libc++. Examples:
Linker errors after upgrading Xcode to 4.5.2 and OpenCV to 2.4.3
How to resolve iOS Link errors with OpenCV
However, I NEED to use libstdc++ because I have other 3rd party libraries which are already compiled with the older stdlib (can't be changed). Is there a way to compile OpenCV 2.4.3+ without -stdlib=libc++ ? Are there special flags to pass to CMake? or to the build_framework.py script that comes in the ios folder of the OpenCV source code?
Alternatively, does anyone have a binary version available? It seems all downloadable from OpenCV assume libc++ / C++11.
In the source for openCV locate this file:
ios/cmake/Modules/Platform/iOS.cmake
Change this line:
set (CMAKE_CXX_FLAGS "-stdlib=libc++ -headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
to:
set (CMAKE_CXX_FLAGS "-stdlib=libstdc++ -headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
Compile using the python script
ios/build_framework.py
Then you should be good to go
I have just tried this on 2.4.3 source, swapped in the resulting framework on an existing project, changed the C++ standard library for the project to libstdc++ and it runs fine.
I am also working on a project using OpenCV and a 3rd party library which requires libstdc++.
As I just ran into this problem myself, I wanted to share what worked for me.
I was able to get OpenCV working by adding "libc++.dylib" to my project.
Build Phases -> "Link Binary with Libraries" -> "+" -> libc++.dylib
For reference, I am using OpenCV 2.4.9 (opencv-2.4.9) from opencv.org. I compiled it using the ios platform build_framework.py per the instructions in OpenCV's docs. No modification necessary.
Are there precompiled Boost binaries for MinGW? I've tried compiling them on my own and I've encountered way too much difficulty, and at this point I'm pretty sure I've broken something vital to Windows and I'm going to figure out what two months down the road. So does anybody know where I can get a precompiled boost library to use? If not, I think I'll just wait until std::thread becomes available on MinGW.
Fedora Linux 16 have them, but compiled with GCC 4.6 (C++ libraries aren't compatible between major compiler versions, Fedora 13 had Boost for GCC 4.4, Fedora 15 has for GCC4.5):
DLLs for: GCC 4.6 GCC 4.5 GCC 4.4
Static for: GCC 4.6 GCC 4.5 GCC 4.4
A free (as in freedom) program — 7-zip — can open this RPM packages on Windows.
It is much easier to cross compile for Windows with MinGW32 on Fedora than to compile with MinGW+MSYS on Windows. Often it is as easy as ./configure --host=i686-pc-mingw32 && make if you have mingw32-* packages installed with distribution's package manager.
A list of available packages for Fedora is here — search for mingw32. There are compiled C and/or C++ libraries for technologies like SDL, Curl, GTK+ with Glib and Glade, Iconv, JPEG, Ogg-Vorbis, SQLite, ZIP, SSL, PCRE, Qt, Readline, Zlib and many more.
It seems a lot of folks have issues with MinGW and Windows when it comes to Boost. I found a great 'how-to' that helped me setup the Eclipse CDT with MinGW and Boost. Worked like a charm, no issues!
How to setup MinGW, Eclipse CDT and Boost
Hope that helps. It covers both Cygwin and MinGW. I used MinGW and now I am making cross platform code in Eclipse. I am also using QMake from the Qt libraries to manage my Makefiles across the multiple platforms. Talk about comfort!
Last week I had a need for the Boost libraries in MinGW. I couldn't find any binaries, but after some very painful debugging I managed to get them compiled myself. I eventually scrapped them and switched to Visual Studio, but I was able to pull the binaries out of my recycling bin for you (compiled with GCC 4.6 I believe):
http://daxnitro.com/mingw.zip
Hopefully they'll be useful to you.
I'm using RHEL 5.3, shipped with gcc 4.1.2 and boost 1.33.
So, there's no boost::unorded_map, no make_shared() factory function to create boost::shared_ptr and other features available in newer releases of boost.
Is there're a newer version of boost compatible with the version of gcc?
If yes, how the upgrade is performed?
Download the latest version (1.43.0) of the Boost libraries from the Boost website and follow the steps in the getting started guide, which explains how to build Boost on a number of platforms, including Linux.
Simply download and install the newest version; it will adapt itself automatically to your compiler.
Sure, just download the latest source from link text. If you are only using header only libraries, it just needs to be unpacked. If you are using one of a handful that require a library, you will need to build those.