c - OpenGL issue: 'incompatible' vs 'cannot find' -


i'm trying a program blender deformation. laptop amd64 , able support i386.

faye@fish:/usr/bin$ dpkg --print-foreign-architectures i386 faye@fish:/usr/bin$ dpkg --print-architecture amd64 

i have no experience makefile script. according google search info, made 2 line code additions in makefile.mk.

# -i option compiler finding headers cflags += $(addprefix  -i, $(include_path)) cc=gcc -m32 

here issue: when run template opengl code with:

gcc test.c -lm -lpthread -lglut -lgl -lglu -o test 

it seems code , libs work correctly.

however, if same makefile.mk(cc=gcc), gives many errors in following form:

/usr/bin/ld: i386 architecture of input file `../external/lib/libxxxxxxxx.a(xxxxxxxx.o)' incompatible i386:x86-64 output 

if use (cc = gcc -m32), error switch to:

/usr/bin/ld: cannot find -lglut /usr/bin/ld: cannot find -lgl /usr/bin/ld: cannot find -lglu 

i guess maybe there wrong in 64 bit os running 32 bit application , libs linking?

-m32, when used x86-64 compiler not mean "compile program i386", means "create program x86-64 cpus using instructions operate on 32 bit registers".

what have there binary has been compiled native i386 , try combine program that's compile x86-64 32 bit registers. 2 don't fit together. big question here of course is, why want use i386 binaries @ all. there reasons using 32bit-x86-64 (half size pointers , can massively reduce memory bandwidth), in general want 64 bit binaries. many problems of 32 bit memory management vanish virtue of having vast amounts of address space.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -