I have a C++ Program which needs the program_options library from the libboost package.
I installed boost with sudo apt-get install libboost1.54-all-dev
and then i compiled my program with
g++ program.cpp -m64 -static -lboost_program_options -o compiled/program.out
.
Everything worked fine.
Then i wanted to compile it for 32bit so i used -m32
instead of -m64
.
It said:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible /usr/lib/libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: cannot find -lboost_program_options
collect2: error: ld returned 1 exit status
Then i used Google and i found, that i have to install the boost i386 package for compiling i386 applications. But it seems, that i cant install amd64 and i386 the same time. When i try to install i386 apt-get want to remove the amd64 packages and when i try amd64 then i386 will be removed.
I can compile my apps in i386, but i have to install i386 and then reinstall amd64...
Hope anyone can help me with this! Thankyou!