I am under my test directory and try to compile a sample from this.
Example:
This run fine.
gcc nii.c -L/usr/X11R6/lib -lXmu -lglut -lGL -lGLU -lm -o nii
But as normal the compilation should work also like but it does not.
gcc -L/usr/X11R6/lib -lXmu -lglut -lGL -lGLU -lm -o nii nii.c
ending with lots of undefined symbols from glut lib …
/tmp/cc6Hom1R.o: In function display': /tmp/cc6Hom1R.o(.text+0x3cf): undefined reference to glutSwapBuffers’
/tmp/cc6Hom1R.o(.text+0x3ec): undefined reference to glutGet' /tmp/cc6Hom1R.o(.text+0x3fb): undefined reference to glutGet’
The thing is I am missing the static libraries from /usr/lib . I have only .so and this is improper for ld linker.
I don’t understand anyway how it comes that changing the place of my source code will change the effect in static libraries. Are the .so taken and used as static ones !?
Strange.
Another thing is: What direct rendering is ?
Are the static libraries excluded since “you have tu use direct rendering” and is an obsolete model of development ?
Thank you very much for answer zico
I misunderstood. So the linker will look first for a shared library than a static ones.
I forgot about this. So shortly XIG provides shared libs and it seems fine.
I actually don’t need the static ones. Did I understood right ?
The order of libs is important since the symbols can be dependent on other libs