开发者

Linking with 32bit libraries under linux 64bit

Let me explain. I'm using webots in combination with aldebaran SDK. My operating system is Debian Squeeze amd64. Webots (64bit) will not work with aldebaran SDK because their libraries are compiled for 32bit. I do not have the source of the libs to recompile in 64bit. While trying to compile the default nao controller under webots, i get the following error:

g++ -o naoqi_for_webots

naoqi_for_webots.o naoproxy.o -L"/usr/local/webots/lib" -lController -L"/home/alex/naoqi-sdk-1.10.44-linux/lib" -lnaoqiclient /usr/bin/ld: skipping incompatible /home/vor73x/naoqi-sdk-1.10.44-linux/lib/libnaoqicl开发者_Go百科ient.so when searching for -lnaoqiclient /usr/bin/ld: cannot find -lnaoqiclient

doing a

file libnaqoqiclient.so

tells me:

libnaoqiclient.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

The default project in webots has a Makefile which among other things has:

additional libraries: LIBRARIES=-L"$(AL_DIR)/lib" -lnaoqiclient

I have downloaded and installed the 32bit version of webots, which links fine with the libnaoqiclient.so but will not link with other webots libraries (libController.so) where again, ld complains about incompatible type.

Can I link using webots 64bit with the 32bit aldebaran sdk ? Can I link using webots 32bit with the 32bit aldebaran ? (I should, but I still get errors). How can I specify to ld (or through Makefile even better) that the library is 32bits ? Or in the case of using webots 32bit how can I specify that I want a 32bit binary ? I do not care if my binary is 32 or 64bit, I do not care if I use the 32 or 64bit version of webots, all I want is to be able to compile the controllers.


Well, you can't mix and match 32-bit and 64-bit code. If you compile all your code using -m32 (to make it build as 32-bit), you may be able to get your application to link if you have 32-bit versions of all your libraries available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜