开发者

Compiling libcurl x86 on Linux x64

I've cross-compiled the bulk of my 32-bit code on my x64 Ubuntu install, but I开发者_如何学JAVA can't work out how to do the same trick with libcurl.

I've tried many permutations of --host and/or --build i486, x86, etc. but none have helped. I've also tried editing the makefiles to include gcc's -m32 flag manually, but it never shows up when I run them.

What should I be doing?


After you download and extract the libcurl source package, as a root user, run this command for setting up the build environment.

configure --host=i686-pc-linux-gnu CFLAGS=-m32 CC=/usr/bin/gcc

followed by

make

you can find the libs under ./lib/.libs/libcurl.so from where you ran the make command. if you dont find /usr/bin/gcc, you will have to install gcc for 32-bit cross compilation env in a 64-bit machine.


It would help if you gave us an error message. I've had issues on Ubuntu x64 systems compiling 32-bit code with 'ld' errors.. I solved it by adding LDEMULATION=elf_i386 to my environment.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜