Expecting n32 objects

Hi
I just downloaded programs from this website and wanted to run
simple.c. I manage to run it by typing gcc -I/usr/local/include -I/GL
-I/usr/include -c simple.c, but when I want to link by typing gcc -o
simple -o32 simple.o -L/usr/local/lib -L/usr/lib -lglut -lXext -lXmu
-lX11 -lGL -lGLU -L/lib -lm, I received these error messages,

ld32: WARNING 84 : /usr/lib32/libX11.so is not used for resolving any
symbol.
ld32: WARNING 84 : /usr/lib32/libXi.so is not used for resolving any
symbol.
ld32: WARNING 84 : /usr/lib32/libXmu.so is not used for resolving
any symbol.
ld32: FATAL 12 : Expecting n32 objects: /usr/freeware/lib/gcc-
lib/mips-sgi-irix6.5/3.3/…/…/…/libglut.a(glut_win.o) is o32.

try to overcome this problem by adding “cc -32” instead of “cc” in
makefile, but still got the same error. Then I tried setting setenv
LD_LIBRARYN32_PATH ( I added N32 after the word LIBRARY),
but still no change. Please advice.
Many thanks

IMHO you should avoid -o32 on the command line. Use -n32, lower case and make sure your include directories are those with the n32 elf binaries. But I think that’s the default these days.

I think the directories are obvious on IRIX but it has been a while and forget which way around it is. I think there are N32 dirs for the library paths.

Also your command line seems confused. You should compile your own objects and then link on a separate command line OR for a single module just do it on one line without specifying any object files. Your specification of the object file on your second line may be stuffing things up when you try to link to coff binaries. If there’s an elf object there from an earlier build.

FWIW it looks like you need to recompile glut as an elf binary i.e. -n32 or delete all your object files in that dir and simply go with coff build specifying no object file if you insist on a single command line and going with a coff build. Make sure you get your link dirs correct whichever you choose (go looking on the file system to see what’s there).