public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with linking
@ 2001-11-04 20:06 ehsan sinavalda
  2001-11-05  8:32 ` bley
  2001-11-05 19:12 ` Frank Schafer
  0 siblings, 2 replies; 10+ messages in thread
From: ehsan sinavalda @ 2001-11-04 20:06 UTC (permalink / raw)
  To: gcc-help

Hi All

I have a problem with linking an oraclel library
(libsql.a)

I entered this command:

gcc -l [libpath]/libsql.a .........

but I received this message:

Can not find -l[pathlib]/libsql.a

But the path and filename is correct

Could someone help me resolving the problem?

E.

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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

* Re: Problem with linking
  2001-11-04 20:06 Problem with linking ehsan sinavalda
@ 2001-11-05  8:32 ` bley
  2001-11-05 19:12 ` Frank Schafer
  1 sibling, 0 replies; 10+ messages in thread
From: bley @ 2001-11-05  8:32 UTC (permalink / raw)
  To: ehsan sinavalda; +Cc: gcc-help

>>>>> "ehsan" == ehsan sinavalda <ehsanoracle@yahoo.com> writes:

    ehsan> Hi All I have a problem with linking an oraclel library
    ehsan> (libsql.a)

    ehsan> I entered this command:

    ehsan> gcc -l [libpath]/libsql.a .........

    ehsan> but I received this message:

    ehsan> Can not find -l[pathlib]/libsql.a

    ehsan> But the path and filename is correct

    ehsan> Could someone help me resolving the problem?

    ehsan> E.

RTFM.

gcc -L[libpath] <source-file> -lsql

HTH
Claudio

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

* Re: Problem with linking
  2001-11-04 20:06 Problem with linking ehsan sinavalda
  2001-11-05  8:32 ` bley
@ 2001-11-05 19:12 ` Frank Schafer
  1 sibling, 0 replies; 10+ messages in thread
From: Frank Schafer @ 2001-11-05 19:12 UTC (permalink / raw)
  To: ehsan sinavalda; +Cc: gcc-help

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

ehsan sinavalda wrote:

> Hi All
>
> I have a problem with linking an oraclel library
> (libsql.a)
>
> I entered this command:
>
> gcc -l [libpath]/libsql.a .........
>
> but I received this message:
>
> Can not find -l[pathlib]/libsql.a
>
> But the path and filename is correct
>
> Could someone help me resolving the problem?
>
> E.
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com

Hi,

youd have to type:

gcc -L [libpath] -lsql .........

instead.

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] 10+ messages in thread

* Re: problem with linking
  2002-12-31  9:24   ` LLeweLLyn Reese
@ 2003-01-02  7:18     ` EM Suijker
  0 siblings, 0 replies; 10+ messages in thread
From: EM Suijker @ 2003-01-02  7:18 UTC (permalink / raw)
  To: gcc-help; +Cc: Andrea 'fwyzard' Bocci

Thank you for the replies. 

The option -Wl,-ztextoff results in a message that not both options
-ztext and -ztextoff can be used. So this does not override the option.
But I looked in the manual again and found a chapter about spec files.
It is possible to write your own spec file. For me it was enough to look
into the spec file. You have to use the flag -mimpuretext so -ztext will
not be passed to the linker. If you leave out this flag the spec file
automatically passes this the option -ztext to the linker.

Best regards,
Erwin Suijker

LLeweLLyn Reese wrote:
> 
> "Andrea 'fwyzard' Bocci" <fwyzard@inwind.it> writes:
> 
> > At 16.05 30/12/2002 +0100, EM Suijker wrote:
> > >Dear Mr./Madam,
> > >
> > >Can you help me with the following problem. When I use the command: "
> > >g++ -v -shared ....", I see that collect2 also sets the option "-z
> > >text". I would like to set this option to "-z textoff" as is the default
> > >for dynamic shared libraries with ld. Can you tell me how to do this? I
> > >cannot find the solution in the manual pages. Thank you in advance.
> >
> > IIRC, there is an option to pass to GCC to specify options to be
> > passed to the linker. You ca use those, to override "-z text" w/ "-z
> > textoff".
> 
> almost. '-Wl,-z textoff'
> I believe the quotes are necessary.
> 
> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Link-Options.html#Link%20Options
> 
> > Have a llok at the GCC manual, I don't remember the option.
> >
> > BTW, I don't know if what I'm saying is sane to do or not...
> 
> It's quite sane.

--

E.M. Suijker (Erwin)
TNO Physics and Electronics Laboratory
Oude Waalsdorperweg 63
2509 JG The Hague
The Netherlands

Tel: +31 70 374 04 98
Fax: +31 70 374 06 54
suijker@fel.tno.nl

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

* Re: problem with linking
  2002-12-30 11:50 ` Andrea 'fwyzard' Bocci
  2002-12-31  9:24   ` LLeweLLyn Reese
@ 2003-01-02  0:33   ` Segher Boessenkool
  1 sibling, 0 replies; 10+ messages in thread
From: Segher Boessenkool @ 2003-01-02  0:33 UTC (permalink / raw)
  To: Andrea 'fwyzard' Bocci; +Cc: EM Suijker, gcc-help

Andrea 'fwyzard' Bocci wrote:
> 
> At 16.05 30/12/2002 +0100, EM Suijker wrote:
> >Dear Mr./Madam,
> >
> >Can you help me with the following problem. When I use the command: "
> >g++ -v -shared ....", I see that collect2 also sets the option "-z
> >text". I would like to set this option to "-z textoff" as is the default
> >for dynamic shared libraries with ld. Can you tell me how to do this? I
> >cannot find the solution in the manual pages. Thank you in advance.
> 
> IIRC, there is an option to pass to GCC to specify options to be passed to
> the linker. You ca use those, to override "-z text" w/ "-z textoff".
> Have a llok at the GCC manual, I don't remember the option.

I think you mean  -Wl,-z,textoff

> BTW, I don't know if what I'm saying is sane to do or not...

I have no idea if this will help Mr. Suijker, either.


Segher

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

* Re: problem with linking
  2002-12-30 11:50 ` Andrea 'fwyzard' Bocci
@ 2002-12-31  9:24   ` LLeweLLyn Reese
  2003-01-02  7:18     ` EM Suijker
  2003-01-02  0:33   ` Segher Boessenkool
  1 sibling, 1 reply; 10+ messages in thread
From: LLeweLLyn Reese @ 2002-12-31  9:24 UTC (permalink / raw)
  To: Andrea 'fwyzard' Bocci; +Cc: EM Suijker, gcc-help

"Andrea 'fwyzard' Bocci" <fwyzard@inwind.it> writes:

> At 16.05 30/12/2002 +0100, EM Suijker wrote:
> >Dear Mr./Madam,
> >
> >Can you help me with the following problem. When I use the command: "
> >g++ -v -shared ....", I see that collect2 also sets the option "-z
> >text". I would like to set this option to "-z textoff" as is the default
> >for dynamic shared libraries with ld. Can you tell me how to do this? I
> >cannot find the solution in the manual pages. Thank you in advance.
> 
> IIRC, there is an option to pass to GCC to specify options to be
> passed to the linker. You ca use those, to override "-z text" w/ "-z
> textoff".

almost. '-Wl,-z textoff'
I believe the quotes are necessary.

http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Link-Options.html#Link%20Options

> Have a llok at the GCC manual, I don't remember the option.
> 
> BTW, I don't know if what I'm saying is sane to do or not...

It's quite sane.

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

* Re: problem with linking
  2002-12-30  7:30 problem " EM Suijker
@ 2002-12-30 11:50 ` Andrea 'fwyzard' Bocci
  2002-12-31  9:24   ` LLeweLLyn Reese
  2003-01-02  0:33   ` Segher Boessenkool
  0 siblings, 2 replies; 10+ messages in thread
From: Andrea 'fwyzard' Bocci @ 2002-12-30 11:50 UTC (permalink / raw)
  To: EM Suijker; +Cc: gcc-help

At 16.05 30/12/2002 +0100, EM Suijker wrote:
>Dear Mr./Madam,
>
>Can you help me with the following problem. When I use the command: "
>g++ -v -shared ....", I see that collect2 also sets the option "-z
>text". I would like to set this option to "-z textoff" as is the default
>for dynamic shared libraries with ld. Can you tell me how to do this? I
>cannot find the solution in the manual pages. Thank you in advance.

IIRC, there is an option to pass to GCC to specify options to be passed to 
the linker. You ca use those, to override "-z text" w/ "-z textoff".
Have a llok at the GCC manual, I don't remember the option.

BTW, I don't know if what I'm saying is sane to do or not...

fwyzard 


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

* problem with linking
@ 2002-12-30  7:30 EM Suijker
  2002-12-30 11:50 ` Andrea 'fwyzard' Bocci
  0 siblings, 1 reply; 10+ messages in thread
From: EM Suijker @ 2002-12-30  7:30 UTC (permalink / raw)
  To: gcc-help

Dear Mr./Madam,

Can you help me with the following problem. When I use the command: "
g++ -v -shared ....", I see that collect2 also sets the option "-z
text". I would like to set this option to "-z textoff" as is the default
for dynamic shared libraries with ld. Can you tell me how to do this? I
cannot find the solution in the manual pages. Thank you in advance.

With kind regards,
Erwin Suijker

Note:
I am using Solaris 7 on a Sparc machine.
--

E.M. Suijker (Erwin)
TNO Physics and Electronics Laboratory
Oude Waalsdorperweg 63
2509 JG The Hague
The Netherlands

Tel: +31 70 374 04 98
Fax: +31 70 374 06 54
suijker@fel.tno.nl

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

* Re: problem with linking
  2001-08-17 16:07 Preeti Gopalan
@ 2001-08-22  0:15 ` Alexandre Oliva
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Oliva @ 2001-08-22  0:15 UTC (permalink / raw)
  To: Preeti Gopalan; +Cc: gcc-help

On Aug 17, 2001, Preeti Gopalan <preeti@wcl5.tamu.edu> wrote:

> So I compile my program  as gcc fname.c -lm -time 

> Is the -ltime part right ? 

Why are you trying to add -ltime?  It shouldn't be necessary.

> It says undefined reference to function

Which function?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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

* problem with linking
@ 2001-08-17 16:07 Preeti Gopalan
  2001-08-22  0:15 ` Alexandre Oliva
  0 siblings, 1 reply; 10+ messages in thread
From: Preeti Gopalan @ 2001-08-17 16:07 UTC (permalink / raw)
  To: gcc-help

Hi 
This is a bit basic. 
I am trying to use a Math.h function

So I compile my program  as gcc fname.c -lm -time 

Is the -ltime part right ? 
If not , How do I do it? 
It says undefined reference to function

Thanks a lot


- Preeti
 
    @@@    
   @^ ^@
  @ O O @
  @\ V /@  
  @@   @@ 

------------------------------------------------------------------------

Luck favours the prepared mind.
     
                        - Louis Pasteur


------------- End Forwarded Message -------------


- Preeti
 
    @@@    
   @^ ^@
  @ O O @
  @\ V /@  
  @@   @@ 

------------------------------------------------------------------------

Luck favours the prepared mind.
     
                        - Louis Pasteur

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

end of thread, other threads:[~2003-01-02  7:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-04 20:06 Problem with linking ehsan sinavalda
2001-11-05  8:32 ` bley
2001-11-05 19:12 ` Frank Schafer
  -- strict thread matches above, loose matches on Subject: below --
2002-12-30  7:30 problem " EM Suijker
2002-12-30 11:50 ` Andrea 'fwyzard' Bocci
2002-12-31  9:24   ` LLeweLLyn Reese
2003-01-02  7:18     ` EM Suijker
2003-01-02  0:33   ` Segher Boessenkool
2001-08-17 16:07 Preeti Gopalan
2001-08-22  0:15 ` Alexandre Oliva

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