public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* In function `MAIN__' : undefined reference to
@ 2003-09-04  3:57 zhu wang
  2003-09-04 20:24 ` Toon Moene
  0 siblings, 1 reply; 10+ messages in thread
From: zhu wang @ 2003-09-04  3:57 UTC (permalink / raw)
  To: gcc-help

Dear helpers,

I am trying to compile some Fortran code, but I got the following error:

$g77 -o uneqm UNEQM.FOR

/tmp/ccovHZ8m.o(.text+0x60d): In function `MAIN__':
: undefined reference to `uneq_'
/tmp/ccovHZ8m.o(.text+0x690): In function `MAIN__':
: undefined reference to `dfault_'
/tmp/ccovHZ8m.o(.text+0x722): In function `MAIN__':
: undefined reference to `uneq_'
/tmp/ccovHZ8m.o(.text+0x739): In function `MAIN__':
: undefined reference to `optif_'
/tmp/ccovHZ8m.o(.text+0xa11): In function `MAIN__':
: undefined reference to `cspec_'
collect2: ld returned 1 exit status

I have the following gcc under Redhat linux 9.0
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

This is my first time to compile Fortran code. I have no clue about the
error.

Thank you very much.

-- 
zhu wang <zhuw@mail.smu.edu>

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04  3:57 In function `MAIN__' : undefined reference to zhu wang
@ 2003-09-04 20:24 ` Toon Moene
  2003-09-04 21:05   ` zhu wang
  0 siblings, 1 reply; 10+ messages in thread
From: Toon Moene @ 2003-09-04 20:24 UTC (permalink / raw)
  To: zhu wang; +Cc: gcc-help

zhu wang wrote:

> I am trying to compile some Fortran code, but I got the following error:
> 
> $g77 -o uneqm UNEQM.FOR
> 
> /tmp/ccovHZ8m.o(.text+0x60d): In function `MAIN__':
> : undefined reference to `uneq_'
> /tmp/ccovHZ8m.o(.text+0x690): In function `MAIN__':
> : undefined reference to `dfault_'
> /tmp/ccovHZ8m.o(.text+0x722): In function `MAIN__':
> : undefined reference to `uneq_'
> /tmp/ccovHZ8m.o(.text+0x739): In function `MAIN__':
> : undefined reference to `optif_'
> /tmp/ccovHZ8m.o(.text+0xa11): In function `MAIN__':
> : undefined reference to `cspec_'
> collect2: ld returned 1 exit status

There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
not included in UNEQM.FOR, but used by it.  Try to locate the source for 
them and compile it in combination wiht UNEQM.FOR.

Hope this helps,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 20:24 ` Toon Moene
@ 2003-09-04 21:05   ` zhu wang
  2003-09-04 21:33     ` zhu wang
  2003-09-04 21:49     ` Toon Moene
  0 siblings, 2 replies; 10+ messages in thread
From: zhu wang @ 2003-09-04 21:05 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc-help

On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> zhu wang wrote:
> 
> > I am trying to compile some Fortran code, but I got the following error:
> > 
> > $g77 -o uneqm UNEQM.FOR
> > 
> > /tmp/ccovHZ8m.o(.text+0x60d): In function `MAIN__':
> > : undefined reference to `uneq_'
> > /tmp/ccovHZ8m.o(.text+0x690): In function `MAIN__':
> > : undefined reference to `dfault_'
> > /tmp/ccovHZ8m.o(.text+0x722): In function `MAIN__':
> > : undefined reference to `uneq_'
> > /tmp/ccovHZ8m.o(.text+0x739): In function `MAIN__':
> > : undefined reference to `optif_'
> > /tmp/ccovHZ8m.o(.text+0xa11): In function `MAIN__':
> > : undefined reference to `cspec_'
> > collect2: ld returned 1 exit status
> 
> There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> them and compile it in combination wiht UNEQM.FOR.

This is my first time to compile Fortran code. I got your point but still
no clue how to do it. I can locate them but what should I do? Maybe
somebody can take a look at those files. I know this maybe too much. 

Thanks,

Zhu Wang

> Hope this helps,
-- 
zhu wang <zhuw@mail.smu.edu>

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 21:05   ` zhu wang
@ 2003-09-04 21:33     ` zhu wang
  2003-09-05 20:25       ` Toon Moene
  2003-09-04 21:49     ` Toon Moene
  1 sibling, 1 reply; 10+ messages in thread
From: zhu wang @ 2003-09-04 21:33 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc-help

I have put all subroutines into a big file and now is better.

But I got the following error. What should I do?


f77 -o uneqm UNEQM.FOR
UNEQM.FOR: In subroutine `optif':
UNEQM.FOR:62: warning:
         call optif(nr,np,p,uneq,typx,typf,msg,ndigit,itnlim,ipr,
              1
UNEQM.FOR:1397: (continued):
         SUBROUTINE
OPTIF(NR,N,X,FCN,TYPSIZ,FSCALE,MSG,NDIGIT,ITNLIM,IPR,
                    2
Argument #15 (named `fpls') of `optif' is one precision at (2) but is
some other precision at (1) [info -f g77 M GLOBALS]

On Thu, 2003-09-04 at 16:02, zhu wang wrote:
> On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> > zhu wang wrote:
> > 
> > > I am trying to compile some Fortran code, but I got the following error:
> > > 
> > > $g77 -o uneqm UNEQM.FOR
> > > 
> > > /tmp/ccovHZ8m.o(.text+0x60d): In function `MAIN__':
> > > : undefined reference to `uneq_'
> > > /tmp/ccovHZ8m.o(.text+0x690): In function `MAIN__':
> > > : undefined reference to `dfault_'
> > > /tmp/ccovHZ8m.o(.text+0x722): In function `MAIN__':
> > > : undefined reference to `uneq_'
> > > /tmp/ccovHZ8m.o(.text+0x739): In function `MAIN__':
> > > : undefined reference to `optif_'
> > > /tmp/ccovHZ8m.o(.text+0xa11): In function `MAIN__':
> > > : undefined reference to `cspec_'
> > > collect2: ld returned 1 exit status
> > 
> > There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> > not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> > them and compile it in combination wiht UNEQM.FOR.
> 
> This is my first time to compile Fortran code. I got your point but still
> no clue how to do it. I can locate them but what should I do? Maybe
> somebody can take a look at those files. I know this maybe too much. 
> 
> Thanks,
> 
> Zhu Wang
> 
> > Hope this helps,
-- 
zhu wang <zhuw@mail.smu.edu>

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 21:05   ` zhu wang
  2003-09-04 21:33     ` zhu wang
@ 2003-09-04 21:49     ` Toon Moene
  2003-09-04 22:22       ` zhu wang
  2003-09-05  1:32       ` zhu wang
  1 sibling, 2 replies; 10+ messages in thread
From: Toon Moene @ 2003-09-04 21:49 UTC (permalink / raw)
  To: zhu wang; +Cc: gcc-help

zhu wang wrote:

> On Thu, 2003-09-04 at 15:23, Toon Moene wrote:

>>There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
>>not included in UNEQM.FOR, but used by it.  Try to locate the source for 
>>them and compile it in combination wiht UNEQM.FOR.

> This is my first time to compile Fortran code. I got your point but still
> no clue how to do it. I can locate them but what should I do? Maybe
> somebody can take a look at those files. I know this maybe too much. 

Ah, OK.

Put all the source code of the "missing" routines (one after the other) 
in a file called A.FOR.

Then issue the command:

g77 -o uneqm UNEQM.FOR A.FOR

That should do it ...

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 21:49     ` Toon Moene
@ 2003-09-04 22:22       ` zhu wang
  2003-09-05  1:32       ` zhu wang
  1 sibling, 0 replies; 10+ messages in thread
From: zhu wang @ 2003-09-04 22:22 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc-help

Thanks. Got it.

Zhu Wang

On Thu, 2003-09-04 at 16:48, Toon Moene wrote:
> zhu wang wrote:
> 
> > On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> 
> >>There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> >>not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> >>them and compile it in combination wiht UNEQM.FOR.
> 
> > This is my first time to compile Fortran code. I got your point but still
> > no clue how to do it. I can locate them but what should I do? Maybe
> > somebody can take a look at those files. I know this maybe too much. 
> 
> Ah, OK.
> 
> Put all the source code of the "missing" routines (one after the other) 
> in a file called A.FOR.
> 
> Then issue the command:
> 
> g77 -o uneqm UNEQM.FOR A.FOR
> 
> That should do it ...
-- 
zhu wang <zhuw@mail.smu.edu>

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 21:49     ` Toon Moene
  2003-09-04 22:22       ` zhu wang
@ 2003-09-05  1:32       ` zhu wang
  1 sibling, 0 replies; 10+ messages in thread
From: zhu wang @ 2003-09-05  1:32 UTC (permalink / raw)
  To: Toon Moene; +Cc: gcc-help

On Thu, 2003-09-04 at 16:48, Toon Moene wrote:
> zhu wang wrote:
> 
> > On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> 
> >>There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> >>not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> >>them and compile it in combination wiht UNEQM.FOR.
> 
> > This is my first time to compile Fortran code. I got your point but still
> > no clue how to do it. I can locate them but what should I do? Maybe
> > somebody can take a look at those files. I know this maybe too much. 
> 
> Ah, OK.
> 
> Put all the source code of the "missing" routines (one after the other) 
> in a file called A.FOR.
> 
> Then issue the command:
> 
> g77 -o uneqm UNEQM.FOR A.FOR
> 
> That should do it ...

Ok no problem to compile. There is a new problem though. When I issued
uneqm,

bash: uneqm: command not found

I am using Redhat Linux 9. I tried a UNIX system to compile and run
without any trouble. I guess I need some library to get the executable
file to run. But what do I need?

Thanks,
-- 
zhu wang <zhuw@mail.smu.edu>

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

* Re: In function `MAIN__' : undefined reference to
  2003-09-04 21:33     ` zhu wang
@ 2003-09-05 20:25       ` Toon Moene
  0 siblings, 0 replies; 10+ messages in thread
From: Toon Moene @ 2003-09-05 20:25 UTC (permalink / raw)
  To: zhu wang; +Cc: gcc-help

zhu wang wrote:

> But I got the following error. What should I do?
> 
> 
> f77 -o uneqm UNEQM.FOR
> UNEQM.FOR: In subroutine `optif':
> UNEQM.FOR:62: warning:
>          call optif(nr,np,p,uneq,typx,typf,msg,ndigit,itnlim,ipr,
>               1
> UNEQM.FOR:1397: (continued):
>          SUBROUTINE
> OPTIF(NR,N,X,FCN,TYPSIZ,FSCALE,MSG,NDIGIT,ITNLIM,IPR,
>                     2
> Argument #15 (named `fpls') of `optif' is one precision at (2) but is
> some other precision at (1) [info -f g77 M GLOBALS]

That's not an error, that's a warning.  However, it might *point* at an 
error: If "fpls" in routine "optif" is DOUBLE PRECISION while the 
corresponding argument in "call optif" is not, you would get this 
warning.  This might be a serious error in your code.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)

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

* RE: In function `MAIN__' : undefined reference to
  2003-09-05 16:00 lrtaylor
@ 2003-09-05 17:16 ` zhu wang
  0 siblings, 0 replies; 10+ messages in thread
From: zhu wang @ 2003-09-05 17:16 UTC (permalink / raw)
  To: lrtaylor; +Cc: toon, gcc-help

Thanks. It helps out.

Zhu


On Fri, 2003-09-05 at 11:00, lrtaylor@micron.com wrote:
> It's probably just not in your PATH, so you'll need to specify the path to it when you run it.  For example, if you're trying to run it from the current directory (that is, the directory it's living in), then you can simply specify "./uneqm".  The "./" says that the program is in your current working directory.  Once you put it in a standard location (e.g., /usr/bin, /usr/local/bin, etc.), it will get picked up in your PATH, and you won't need to specify the path to it any more.
> 
> Lyle
> 
>  -----Original Message-----
> From: 	zhu wang [mailto:zhuw@mail.smu.edu] 
> Sent:	Thursday, September 04, 2003 7:30 PM
> To:	Toon Moene
> Cc:	gcc-help@gcc.gnu.org
> Subject:	Re: In function `MAIN__' : undefined reference to
> 
> On Thu, 2003-09-04 at 16:48, Toon Moene wrote:
> > zhu wang wrote:
> > 
> > > On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> > 
> > >>There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> > >>not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> > >>them and compile it in combination wiht UNEQM.FOR.
> > 
> > > This is my first time to compile Fortran code. I got your point but still
> > > no clue how to do it. I can locate them but what should I do? Maybe
> > > somebody can take a look at those files. I know this maybe too much. 
> > 
> > Ah, OK.
> > 
> > Put all the source code of the "missing" routines (one after the other) 
> > in a file called A.FOR.
> > 
> > Then issue the command:
> > 
> > g77 -o uneqm UNEQM.FOR A.FOR
> > 
> > That should do it ...
> 
> Ok no problem to compile. There is a new problem though. When I issued
> uneqm,
> 
> bash: uneqm: command not found
> 
> I am using Redhat Linux 9. I tried a UNIX system to compile and run
> without any trouble. I guess I need some library to get the executable
> file to run. But what do I need?
> 
> Thanks,
-- 
zhu wang <zhuw@mail.smu.edu>

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

* RE: In function `MAIN__' : undefined reference to
@ 2003-09-05 16:00 lrtaylor
  2003-09-05 17:16 ` zhu wang
  0 siblings, 1 reply; 10+ messages in thread
From: lrtaylor @ 2003-09-05 16:00 UTC (permalink / raw)
  To: zhuw, toon; +Cc: gcc-help

It's probably just not in your PATH, so you'll need to specify the path to it when you run it.  For example, if you're trying to run it from the current directory (that is, the directory it's living in), then you can simply specify "./uneqm".  The "./" says that the program is in your current working directory.  Once you put it in a standard location (e.g., /usr/bin, /usr/local/bin, etc.), it will get picked up in your PATH, and you won't need to specify the path to it any more.

Lyle

 -----Original Message-----
From: 	zhu wang [mailto:zhuw@mail.smu.edu] 
Sent:	Thursday, September 04, 2003 7:30 PM
To:	Toon Moene
Cc:	gcc-help@gcc.gnu.org
Subject:	Re: In function `MAIN__' : undefined reference to

On Thu, 2003-09-04 at 16:48, Toon Moene wrote:
> zhu wang wrote:
> 
> > On Thu, 2003-09-04 at 15:23, Toon Moene wrote:
> 
> >>There are some routines (with names UNEQ, DFAULT, OPTIF, CSPEC) that are 
> >>not included in UNEQM.FOR, but used by it.  Try to locate the source for 
> >>them and compile it in combination wiht UNEQM.FOR.
> 
> > This is my first time to compile Fortran code. I got your point but still
> > no clue how to do it. I can locate them but what should I do? Maybe
> > somebody can take a look at those files. I know this maybe too much. 
> 
> Ah, OK.
> 
> Put all the source code of the "missing" routines (one after the other) 
> in a file called A.FOR.
> 
> Then issue the command:
> 
> g77 -o uneqm UNEQM.FOR A.FOR
> 
> That should do it ...

Ok no problem to compile. There is a new problem though. When I issued
uneqm,

bash: uneqm: command not found

I am using Redhat Linux 9. I tried a UNIX system to compile and run
without any trouble. I guess I need some library to get the executable
file to run. But what do I need?

Thanks,
-- 
zhu wang <zhuw@mail.smu.edu>


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

end of thread, other threads:[~2003-09-05 20:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-04  3:57 In function `MAIN__' : undefined reference to zhu wang
2003-09-04 20:24 ` Toon Moene
2003-09-04 21:05   ` zhu wang
2003-09-04 21:33     ` zhu wang
2003-09-05 20:25       ` Toon Moene
2003-09-04 21:49     ` Toon Moene
2003-09-04 22:22       ` zhu wang
2003-09-05  1:32       ` zhu wang
2003-09-05 16:00 lrtaylor
2003-09-05 17:16 ` zhu wang

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).