Hi Zach,

On 3/13/07, Zach Deedler <[EMAIL PROTECTED]> wrote:
I am running with a 64-bit Pentium D processor.  Can you mix 64-bit
libraries with 32-bit?

Today I did some experiments with doing cross compile of OpenThreads
and OpenSceneGraph with 32bit on my 64 bit box all using the new CMake
build system.

I have just tried out mixing a 32bit libOpenThreads.so with a 64bit
build of OSG and go this message:

Linking CXX shared library ../../lib/libosg.so
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/local/lib/libOpenThreads.so when searching
for -lOpenThreads
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/local/lib/libOpenThreads.so when searching
for -lOpenThreads
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:
cannot find -lOpenThreads
collect2: ld returned 1 exit status
make[2]: *** [lib/libosg.so] Error 1
make[1]: *** [src/osg/CMakeFiles/osg.dir/all] Error 2
make: *** [all] Error 2

In other words the answer is no, you can't mix 32but and 64bit libs.

If you want to compile the OSG and OpenThreads 32 bit then try out the
new CMake build, and trick it into do a cross compile by setting a few
env vars:

export CXXFLAGS=-m32
export CFLAGS=-m32
export LDFLAGS=-m32

cd OpenThreads
cmake .
make -f Makefile -j 2
sudo make -f Makefile install
cd ..

cd OpenSceneGraph
cmake .
make -f Makefile -j 2
sudo make -f Makefile install

Not the -j 2 is to tell gmake to use two processors during build, and
the -f Makefile is a temporary measure while we still have the old
GNUmakefile still around in SVN.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to