How to build Boost Libraries for Code Warrior IDE (v5.7) for RVDS 3.0? - boost

I am using Boost.Regex library to write a code for 10 digit mobile no. verification.I have compiled the Boost library using bjam.exe for msvc.
Now I want to run the same code for a BREW handset.For generating the executable (mod file) for the handset, I compile the C++ code using RVDS 3.0.The IDE used is Code Warrior 5.7
Can any body please tell me the way to compile boost library for RVDS 3.0.I am using armcc compiler.

You might want to rebuild the boost libraries with the appropriate compiler set to --toolset parameter of bjam. Here is the bjam reference: Boost Jam

Related

gcc auto link shared libraries needed by static libraries

I've installed the Nana library and I've read from their website that the library needs some shared libraries to work.. So during linking (gcc) i need to put all links (-lXft, -l...).
Is there a solution to auto link shared libraries needed by Nana?
I am using ubuntu 18.04 and I've read that I can do that with Makefile but I haven't understood how.. I want to use Premake to organize my project so that I can say to Premake that it needs to include the Nana library and then Premake "smartly" find all shared libraries..
When I used Premake and I linked the Nana library (statically) the compiler gaves me a lot of errors...
all the errors say:
undefined reference to: X...
So I need to include all the shared libraries that Nana needs, but how?
gcc has no idea about inter-library dependencies. You need a build system (which would use gcc as the compiler) for that.
Now, the Nana library uses the CMake build system. Thus a good solution to the problem should be to get the authors of Nana to properly export the library's CMake targets, and distribute a .cmake file which you can then import if you also build with CMake.
Alternatively - perhaps such a CMake file already exists somewhere (I haven't been able to quickly find it though).
I would ask about this in the Nana forums.

How do I install uuid boost library?

I followed many tutorials to get boost installed, firstyly I downloaded boost and added path with:
path=%path%;
c:\program files (x86)\code block\mingw\bin
secondly I ran
bootstrap.bat gcc
and then
b2 toolset=gcc
but there is no such lib installed as UUID which I really need to my project. Is there any way to make it happen as I haven't found any specific help among all those topics and I'm getting really confused. I'm working on win10 if that makes any difference.
Did you read documentation?
Boost UUID library is header-only library. See Configuration:
The library does not require building or any special configuration to be used.
So you have to download boost library and unpack it to some place in your disk (for example to c:\boost). Path to boost library will be c:\boost\boost_1_62_0. Then you have to specify the compiler the place where the boost library is located. It is compiler or IDE specific way. But the common way is to use "Additional Include Directories" option of compiler. It is -I for GCC and /I for MS VC++. Last step is to write include directive in your c++ code. For example:
#include <boost/uuid/uuid.hpp>
For code example see Example and files in boost/libs/uuid/test/ folder

compiling static library for windows in cygwin

I'm trying to compile a library (dxflib) for use in windows using cygwin.
I'm loosely following the instructions found here: http://www.ribbonsoft.com/doc/dxflib/2.5/reference/dxflib-reference-manual.pdf
I can get it to compile to make a .a library (ie a unix static library), using 'make' but obviously I'm using cygwin because I want to compile a .lib for use in windows.
When I try to use 'MinGW32-make' (or any other derivative I can think of) cygwin claims that it doesn't exist. I've reinstalled all options with mingw or gcc or g++ remotely in their name in cygwin.
Does anybody know how to get it to compile from the makefile to produce a .lib? Thanks.

Compiling Boost as LLVM bitcode

First of all, I am only doing something for fun, not for production.
LLVM's bitcode, to some extents, can works like Java's bytecode that can be cross platform. I think it should works in most situations, unless your code consists of some inline asm or something special. I have successfully compiled a simple hello world program with clang to LLVM bitcode in Linux, and run it properly with lli in Windows.
But, how can I use boost library such as boost_thread in that way? I can pack bitcode files together with llvm-link, and it will still be cross platform. But if I link the bitcode with *.a by some methods (I have not tried to do that, but it seems that I can do so even llvm-ld has been removed), it will probably not be cross platform anymore (and become a native binary executable file). So, I want to compile boost to LLVM bitcode, so that I can link the boost library to my program.
If you think that linking it statically will make the bitcode to large, you can also 'link' them in runtime, by lli <your bitcode> <boost's bitcode>...
I have compiled boost with ./b2 toolset=clang cxxflags="-emit-llvm -c". I am not sure whether I am in the right way. If not, is there any way for me to compile boost to bitcodes?
EDIT:
The above command seems to be partially work. The *.o files produced are LLVM bitcode, but it will then be archived to *.a. Simply decompress the *.a and use llvm-link to link the files in the archive together may work.
BUT, unfortunately, there is inline asm in boost's thread library. So, it cannot run...

Boost requires compiled libraries like libboost_date_time for even basic things. How do I eliminate dependencies on building those libraries?

I want a header-only BOOST.
Using boost::bind and boost::ptr_set, it seems unnecessary to depend on libboost_date_time and libboost_regex. But I get a linker error for those libraries when I build.
LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc90-mt-s-1_47.lib'
Geenrally you can #define BOOST_ALL_NO_LIB to disable the auto-linking of the MSVC compiler you are using as documented (see Boost.Config). But of course you still have to compile and link the libraries you do use. Which if you are getting those errors it means that you are likely using the libraries.
#define BOOST_DATE_TIME_NO_LIB in your compiler Makefile to exclude the datetime library. #define BOOST_REGEX_NO_LIB to exclude the regex library, for example.
You can use the bcp utility to copy the specific portions of Boost that you actually use.

Resources