Question

I'm currently programming an extension to a program, which only supports i386 (and I am running amd64 Ubuntu 11.10). Whenever I compile my extension source I need to use the -m32 flag to force 32 bit architecture (otherwise the program will not be able to load my extension). Sooner or later it is inevitable to avoid boost thanks to its huge and stable library, which leads to my problem.

I want to use the boost filesystem, which uses OS specific function calls, which in turn leads to the requirement of a library file instead of only a header implementation. The problem is; I can't/don't know how to setup the boost filesystem (i386 version) on my amd64 machine. If I download a prebuilt (.deb) package for i386 and install it using -force-architecture it still fails complaining about dependencies.

So basically; how do I setup boost with 32bit (i386) architecture on my (amd64) system?

Was it helpful?

Solution

It seems as if I did it right all along but I was too dumb to realize how to properly link libraries with the GCC linker, coming from a Windows environment. You can easily compile boost libraries by using the -m32 flag and by setting up bjam properly. See the first answer in this question for details: How do I force a 32 bit build of boost with gcc?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top