c++ - OSX : Symbols not found for architecture i386 -


i have following makefile uses c++ , opengl. compiling @ all, added -m32 line in order attempt compile in x86_64. i'm getting same error it's saying i386 instead.

what can program compile?

i'm running osx 10.8, in case makes difference.

thank all.

.suffixes: .cpp   #change following 2 lines reflect locations # of glut library (.a) , includes on system  #top = /pool/u/class/cs520/mesa-7.0.3 cflags  = -w -s -o2 -ansi -dshm xlibs   = -lx11 -lxext -lxmu -lxext -lxmu -lxt -lxi -lsm -lice libs    = -lglut -lglu -lgl  #incls   = -i/usr/x11r/include -i/share/mesa/include   #-i$(top)/include incls   = -i/usr/x11r6/include -i/usr/x11/include/gl libdir  = -l/usr/x11/lib -l/usr/x11r6/lib #-l$(top)/lib   #glut_lib_location=/usr/x11r6/lib #glut_inc_location=/usr/x11r6/include  #cc=gcc cc=g++ #cppflags=-i${glut_inc_location} #-w  #gllibs=-l${glut_lib_location} -lglut -lgl -lglu #lpath=${glutpath}  incs=   libs =     ${gllibs}   -lm    all: terrain   terrain: tg.o tga.o terrain.o      $(cc)   $(lpath) tg.o tga.o terrain.o  -m32 ./glui/libglui.a $(libs) -o terrain  $(libdir) $(libs) $(xlibs)  .cpp.o:     $(cc) -c -d_linux_ $(incs) $*.cpp $(incls)  clean:     rm *.o  tg.o: tg.cpp terrain.h tga.h glui.h  tga.o: tga.cpp tga.h terrain.o : terrain.cpp terrain.h 

and i'm getting following error.

g++ -c -d_linux_  tga.cpp -i/usr/x11r6/include -i/usr/x11/include/gl g++ -c -d_linux_  terrain.cpp -i/usr/x11r6/include -i/usr/x11/include/gl g++    tg.o tga.o terrain.o  -m32 ./glui/libglui.a    -lm   -o terrain  -l/usr/x11/lib -l/usr/x11r6/lib  -lglut -lglu -lgl  -lx11 -lxext -lxmu -lxext -lxmu -lxt -lxi -lsm -lice ld: warning: ld: warning: ld: warning: ignoring file tg.o, file built unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) not architecture being linked (i386): tg.oignoring file terrain.o, file built unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) not architecture being linked (i386): terrain.oignoring file tga.o, file built unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) not architecture being linked (i386): tga.o   ld: warning: ignoring file ./glui/libglui.a, file built archive not architecture being linked (i386): ./glui/libglui.a undefined symbols architecture i386:   "_main", referenced from:       start in crt1.10.6.o ld: symbol(s) not found architecture i386 collect2: ld returned 1 exit status make: *** [terrain] error 1 

you're compiling macos x don't use x11 native opengl framework; compiler/linker option -framework opengl.

and error have stems took precompiled library filed not compiled particular version of macos x, if macos x @ all. no compiler switch there.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -