I am using boost libraries in an application which is targeted for multiple platforms including android.
unfortunately boost libraries are not included in android so i am trying to include the boost source files in project and compile them but i am getting many errors when i am trying to do that mostly unresolved symbols in many files
i have created the project as a shared library using eclipse ide and os is ubuntu 11.10
please help and i am not really a nerd so easy to understand solution would be really helpful.
Thanks in advance
make a folder called local/include/ in your home folder. Then create a symbolic link from /usr/include/boost to there. Include ~/local/include in the LOCAL_C_INCLUDES variable in your Android.mk. This will work for the header-only libraries in boost.
Related
I'm currently working on a C++14 project in OSX using boost libraries.
I am able to compile & link the project incl. the boost libraries.
But, while trying to run the executable file in another computer I'm required to install boost first.. using brew install boost.
Is it possible to remove this dependency some how?
OK so I managed to solve this.. First, I tried to reference .a files (instead of the dylib ones) to the project.
But it still didn't seem to work, only when I changed the path from
libboost_X.a to the full path /usr/foo/bar/libboost_X.a in Build Phases -> Other Linker Flags it seemed to solve the problem.
I have created a C++ library on Windows using Qt and it works well. Now I want to build the same C++ library on OS X/Mac using Qt, and after running the same steps as how I made this C++ library on Windows, I’m not sure which generated files is the library I need on OS X.
On Windows, I can use the library in other C++ project through the following files: .dll, object file library and the header file. I can find the first two files generated in the target folder:
But on Mac, after checking the same folder I found the generated files as below:
Which files are the library that I made? And how to use the generated library in other C++ project on OS X?
I try to find some step-by-step guide but with no luck so far, so if there’s any useful link that will be of help.
Thank you in advance!
The library is
libsdk.1.0.0.dylib
all other libsdk*.dylib are links to the library (compatibility reasons, some applications look for libsdk.dylib). You use these library as you would use any other dynamic library. Supply the library and the header files to the local path or install them system wide (DYLD_LIBRARY_PATH).
See How to use dylib in Mac OS X (C++) for more information.
How can I use libcurl with my project without actually installing it or curl on the system?
I want to make my source-code portable, so that any developer can copy the folder with all sources and other files, run make and compile the program without the need for system level installations.
I am looking for (probably separate) solutions for Linux and for Windows (dll?). If it is possible, provide some standard/official solution and not hack (I'd like to be educated about linking third party libraries)
I've used it on Windows using Visual Studio, all you need to do under Windows:
Download the source
Using CMake generate the project files (when using Visual Studio).
Build the libraries, 3 files will be built: libcurl.lib, libcurl_imp.lib and libcurl.dll
Include curl.h in your project and add the paths to your .lib files
Build your program, put libcurl.dll in the executable folder and it will work.
On Linux it should be a similar process, build the libraries and include them with your source.
You probably want to build a static library out of libcurl and link agains it. Should be pretty straightforward and the process is almost identical on every OS.
I recently downloaded http://boost-log.sourceforge.net/libs/log/doc/html/index.html but I can't seem to find out how to build it. The rest of my boost lib was installed by using the installer, so all I did was selecting the files I wanted to include.
So how do I build Logs? Building for windows is completely new to me and I would really appreciate any help!
EDIT
Merge boost.log in the boost directory structure first.
Did you build boost ? If not, you have to go to your boost directory, run boostrap.sh and then run b2.exe. That will build all boost libraries.
Since you are on Windows, boost supports automatic linking, i.e. you just include the header files and the required libraries will be linked automatically when building your project from Visual Studio.
I have only previously used visual studio for developing c++ but I've just moved to netbeans and am having some issues.
I got mingw installed so that my projects will compile but I dont know how to add external libraries to that. I want to use a static library, not a dll.
The library I specifically am looking at is libpng
I hope this isn't too IDE specific, I'm also looking to know how to prepare the library.
Windows OS.
I figured it out more or less. I used the cmake gui, configured for msys make and mingw g++ and gcc, on the zlib source directory and then ran msys make and make install on the output directory. After that I did the same on libpng, but I had to add some variables to point to the zlib include and library directories within cmake.
Then in netbeans, I right clicked>>properties on my project and added include and lib location for each of the two libraries. I also could have copied the files into my mingw directories.
Now I'm just stuck with this issue.