This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Makefile


Hi!

I have some problems with the attached Makefile:

When I compile and link all as in the rule uppg4: everything works fine,
but I do want to split up compiling and linking, so I can divide my huge
main file uppg4.c into different objectives s.a. uppg4.o, myrnd.0 and so
on, to link them together later. Also I need to check for errors during my
development.

So I divided everything up, using rules uppg41.o: and uppg41:

Now I encounter the errors:

--------------------------------------------------------------------
fraggel39> make uppg41
gcc -I/users/mdstud/graf/old1999/OPENGL99 -I/usr/X11/include -pipe
-fpic -O3 -DSHM -c  -c  uppg4.c
gcc -O3 -c myrnd.c
gcc -L/usr/openwin/lib -L/opt/SUNWmotif/lib
-L/usr/src/md/pd/X11/libs/glut-3.7/lib/glut
-L/usr/src/md/pd/X11/libs/glut-3.7/lib/mui -R/usr/openwin/lib
-R/usr/local/lib -R/usr/X11/lib -R/opt/SUNWmotif/lib -lmui -lglut -lGLU
-lGL -lm -L/usr/ucblib -R/usr/ucblib -lX11 -lXm -lXmu -lXext -lnsl
-lsocket -lucb -lgen -o uppg4 uppg4.o myrnd.o
Undefined                       first referenced
 symbol                             in file
glutCreateWindow                    uppg4.o
glutMainLoop                        uppg4.o
glutDisplayFunc                     uppg4.o
glutReshapeFunc                     uppg4.o
glutMouseFunc                       uppg4.o
glutInitDisplayMode                 uppg4.o
glutMotionFunc                      uppg4.o
glutPostRedisplay                   uppg4.o
glutInitWindowSize                  uppg4.o
ld: fatal: Symbol referencing errors. No output written to uppg4
*** Error code 1
make: Fatal error: Command failed for target `uppg41'
--------------------------------------------------------------------

and I don't know what's wrong? Everything is included and linked just as
it should be supposed to, but the libraryfunctions in glut doesn't seem to
be found at all!

There must be a way to divide large items up...

___M_V_H______________Dr_Xem@cs________________lksign v2.0__

"As men's prayers are a disease of the will, so are their creeds
a disease of the intellect." - [Ralph Waldo Emerson]

Dr_Xemacs, the one and only!         (aka Lars Kristiansson)
md8lars@mdstud.chalmers.se               dr_xemacs@telia.com
http://www.mdstud.chalmers.se/~md8lars        ICQ : 25152178



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]