public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: makefile
@ 2001-02-26  3:15 David Korn
  0 siblings, 0 replies; 9+ messages in thread
From: David Korn @ 2001-02-26  3:15 UTC (permalink / raw)
  To: 'Lars Kristiansson', gcc-help

>-----Original Message-----
>From: Lars Kristiansson [ mailto:md8lars@mdstud.chalmers.se ]
>Sent: 26 February 2001 07:40

>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!

  This is the problem:

>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

  You need to specify all of your application's .o files *first* on the 
linker command line, and all the libraries *last*.  This is because the
linker works by remembering what undefined symbols it comes across as it
goes along, and extracting the required modules from the library archives
and linking them to your application.

  If you put the libs on the command line first, it processes them all
before
it knows any of the undefined symbols that your program wants, and so
doesn't
extract anything from the libs.  Then it processes your applications, finds
all the undefined symbols, and remembers them.  Then it's run out of files
to
process and it hasn't resolved your symbols, so it gets an error.

  If you put your app files first, it processes them and remembers all the
undefined symbols, then as it runs through the libs it finds the functions
they reference and links them into the final exe.

  Yes, the linker could and should be a bit cleverer about this.  But until
it is, the fix is to put your .o files first.

        DaveK
-- 
"Never give succor to the mentally ill; it is a bottomless pit."  
  -- William S. Burroughs


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Makefile
  2001-11-15  5:32 Makefile kabir.patel
@ 2001-11-16  2:47 ` Frank Schafer
  0 siblings, 0 replies; 9+ messages in thread
From: Frank Schafer @ 2001-11-16  2:47 UTC (permalink / raw)
  To: kabir.patel; +Cc: me, gcc-help

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

kabir.patel@uk.andersen.com wrote:

> >>You may well do better in the long term to download and install the latest GNU
> >>make (as well as putting /usr/ccs/bin into your path).
>
> Where would I get  the latest gnu make file from? Is it just something that  I
> can download?
>
> Thanks
>
> Kabir
>
> *******************Internet Email Confidentiality Footer*******************
>
> Privileged/Confidential Information may be contained in this message.  If you
> are not the addressee indicated in this message (or responsible for delivery of
> the message to such person), you may not copy or deliver this message to anyone.
> In such case, you should destroy this message and kindly notify the sender by
> reply email. Please advise immediately if you or your employer does not consent
> to Internet email for messages of this kind.  Opinions, conclusions and other
> information in this message that do not relate to the official business of my
> firm shall be understood as neither given nor endorsed by it.

Hi,

try ftp.gnu.org or a mirror

Regards
Frank

[-- Attachment #2: Card for Frank Schafer --]
[-- Type: text/x-vcard, Size: 218 bytes --]

begin:vcard 
n:Schafer;Frank
x-mozilla-html:FALSE
org:SETUZA a.s.;IT
adr:;;;;;;
version:2.1
email;internet:frank.schafer@setuza.cz
title:Dipl. Ing.
note:System administrator
x-mozilla-cpt:;0
fn:Frank Schafer
end:vcard

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Makefile
  2001-11-14 11:32 Makefile kabir.patel
@ 2001-11-15  5:34 ` Rupert Wood
  0 siblings, 0 replies; 9+ messages in thread
From: Rupert Wood @ 2001-11-15  5:34 UTC (permalink / raw)
  To: kabir.patel; +Cc: gcc-help

Kabir Patel wrote:

> When I try running make bootstrap (or make "anything"), it comes
> back with "make: not found" message.

That means that it can't find the 'make' binary to run. It's in
/usr/ccs/bin; there's other good stuff in /usr/ccs/bin (e.g. the system
assembler and linker) so that probably ought to be in your path.

*However* there are known bugs in a lot of versions of make. You may
well do better in the long term to download and install the latest GNU
make (as well as putting /usr/ccs/bin into your path). I can't remember
if Sun make is officially supported at the moment - check the install
docs - but I've never had any problems with it.

> I have looked into the Makefile. Some of it was as follows:
> 
> VPATH = .
> links =
> srcdir = .
> 
>  (is that ok?)

Yes and no. Yes, they're valid contents for those variables. No, it
looks like you've configured the compiler to build in the source tree
instead of in a separate object directory as recommended by the
installation instructions ("srcdir == objdir should still work, but
doesn't get extensive testing").

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Makefile
@ 2001-11-15  5:32 kabir.patel
  2001-11-16  2:47 ` Makefile Frank Schafer
  0 siblings, 1 reply; 9+ messages in thread
From: kabir.patel @ 2001-11-15  5:32 UTC (permalink / raw)
  To: me; +Cc: gcc-help





>>You may well do better in the long term to download and install the latest GNU
>>make (as well as putting /usr/ccs/bin into your path).

Where would I get  the latest gnu make file from? Is it just something that  I
can download?

Thanks

Kabir

*******************Internet Email Confidentiality Footer*******************


Privileged/Confidential Information may be contained in this message.  If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Makefile
@ 2001-11-14 11:32 kabir.patel
  2001-11-15  5:34 ` Makefile Rupert Wood
  0 siblings, 1 reply; 9+ messages in thread
From: kabir.patel @ 2001-11-14 11:32 UTC (permalink / raw)
  To: gcc-help




I viewed the contents of the makefile that was generated after running the
./configure script.

When I try running make bootstrap (or make "anything"), it comes back with
"make: not found" message.

The Makefile (and Makefile.ini) does exist (bootstrap doesn't though). Could
somebody  tell me
why this might happen?

I have looked into the Makefile. Some of it was as follows:

VPATH = .
links =
srcdir = .

 (is that ok?)

Thanks
Kabir



*******************Internet Email Confidentiality Footer*******************


Privileged/Confidential Information may be contained in this message.  If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* makefile
@ 2001-02-25 23:39 Lars Kristiansson
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Kristiansson @ 2001-02-25 23:39 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]

Hi!

(Sorry! A new copy with this mail WITH the Makefile)

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


___M_V_H______________Dr_Xem@cs________________lksign v2.0__

En dag kommer vi att se tillbaka på den här stunden,
skratta nervöst och snabbt byta ämne. - [Metro]

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Makefile
@ 2001-02-25 23:29 Lars Kristiansson
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Kristiansson @ 2001-02-25 23:29 UTC (permalink / raw)
  To: gcc-help

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Makefile
  1999-12-07  1:36 Makefile Ben A. Abderrazek
@ 1999-12-31 22:24 ` Ben A. Abderrazek
  0 siblings, 0 replies; 9+ messages in thread
From: Ben A. Abderrazek @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

Hi everyone,

Where could I find help in writing Makefile for make? I've read the
man page for make, no help. 


Thanks for any help,

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Makefile
@ 1999-12-07  1:36 Ben A. Abderrazek
  1999-12-31 22:24 ` Makefile Ben A. Abderrazek
  0 siblings, 1 reply; 9+ messages in thread
From: Ben A. Abderrazek @ 1999-12-07  1:36 UTC (permalink / raw)
  To: help-gcc

Hi everyone,

Where could I find help in writing Makefile for make? I've read the
man page for make, no help. 


Thanks for any help,

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-11-23  7:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-26  3:15 makefile David Korn
  -- strict thread matches above, loose matches on Subject: below --
2001-11-15  5:32 Makefile kabir.patel
2001-11-16  2:47 ` Makefile Frank Schafer
2001-11-14 11:32 Makefile kabir.patel
2001-11-15  5:34 ` Makefile Rupert Wood
2001-02-25 23:39 makefile Lars Kristiansson
2001-02-25 23:29 Makefile Lars Kristiansson
1999-12-07  1:36 Makefile Ben A. Abderrazek
1999-12-31 22:24 ` Makefile Ben A. Abderrazek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).