public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Newbie new to the list
@ 2011-02-18  2:11 [p e r c e p t i c o n]
  2011-02-18  7:11 ` Kai Ruottu
  2011-02-18  9:14 ` Jonathan Wakely
  0 siblings, 2 replies; 4+ messages in thread
From: [p e r c e p t i c o n] @ 2011-02-18  2:11 UTC (permalink / raw)
  To: gcc-help

Hi all,
About 20 years ago I knew how to use this compiler,but I became a mac programmer then windows then mobile and now find myself back to unix again...

I have this error:

/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start

And I've seen it all over the inet, but every case seems to be different.

In my case I'm trying to build a 32bit shared object. I have -shared and -fPIC
set even -m32 

Can someone share with me how to tell gcc to use my lib32 directory instead of lib64 which it seems to default to?


Thanks


[-percy-]

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

* Re: Newbie new to the list
  2011-02-18  2:11 Newbie new to the list [p e r c e p t i c o n]
@ 2011-02-18  7:11 ` Kai Ruottu
  2011-02-18  9:14 ` Jonathan Wakely
  1 sibling, 0 replies; 4+ messages in thread
From: Kai Ruottu @ 2011-02-18  7:11 UTC (permalink / raw)
  To: percepticon; +Cc: gcc-help

18.2.2011 4:03, [p e r c e p t i c o n] kirjoitti:

> I have this error:
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start
>
> In my case I'm trying to build a 32bit shared object. I have -shared and -fPIC
> set even -m32
>
> Can someone share with me how to tell gcc to use my lib32 directory instead of lib64
> which it seems to default to?

The 32-bit startups (like 'crt1.o'), libraries and headers aren't
usually installed as default with the "program tools", one must
install these specifically. This happens with "System/Administration"
and there "Add/remove applications" or something in the GUI of an
uptodate Red Hat system...

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

* Re: Newbie new to the list
  2011-02-18  2:11 Newbie new to the list [p e r c e p t i c o n]
  2011-02-18  7:11 ` Kai Ruottu
@ 2011-02-18  9:14 ` Jonathan Wakely
       [not found]   ` <AANLkTimm9x5so-Rj8Do0x10jWXKvDo+Rt74U7Mq7YWNS@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2011-02-18  9:14 UTC (permalink / raw)
  To: percepticon; +Cc: gcc-help

On 18 February 2011 02:03, [p e r c e p t i c o n] wrote:
> I have this error:
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start

That's not an error, it's the run up to an error message, telling you
the location of the error.  You haven't shown the actual error.

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

* Re: Newbie new to the list
       [not found]     ` <AANLkTi=wmjhdpx=wZqz0U-FGV-Pa-o+qbWb=b=XTzK9w@mail.gmail.com>
@ 2011-02-23 10:19       ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2011-02-23 10:19 UTC (permalink / raw)
  To: [p e r c e p t i c o n]; +Cc: gcc-help

On 23 February 2011 05:29, [p e r c e p t i c o n]
<percepticon@gmail.com> wrote:
> hi again,
>
> ok, last week i mysteriously got it to compile my shared lib.  this week
> however, the errors returned even though i'm doing the exact same thing.
> here's the message:

Obviously you're not doing exactly the same thing, or you'd get the
same results.

> g++   -fPIC -DUNIX -D_REENTRANT -I. -I./../include  AuthModule.cpp -c -o
> sampleAuth/AuthModule.o

No -m32 here, so the output file is 64-bit

> g++ -shared -m32 -lstdc++ -o ./sampleAuth/AuthModule.so
> ./sampleAuth/AuthModule.o

-m32 here, requesting 32-bit output

> /usr/bin/ld: warning: i386:x86-64 architecture of input file
> `./sampleAuth/AuthModule.o' is incompatible with i386 output

It's telling you that AuthModule.o cannot be linked into a 32-bit
file, because it's 64-bit.

> i set LD_LIBRARY_PATH in my env vars to point to the 32bit libs...
> i also set LDFLAGS to -L/path/to/32bitlibs
> it's also tellimg me that it std::basic_string is not defined even though as
> you can see above i'm linking the std lib...

Have you used #include <string> ?

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

end of thread, other threads:[~2011-02-23  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-18  2:11 Newbie new to the list [p e r c e p t i c o n]
2011-02-18  7:11 ` Kai Ruottu
2011-02-18  9:14 ` Jonathan Wakely
     [not found]   ` <AANLkTimm9x5so-Rj8Do0x10jWXKvDo+Rt74U7Mq7YWNS@mail.gmail.com>
     [not found]     ` <AANLkTi=wmjhdpx=wZqz0U-FGV-Pa-o+qbWb=b=XTzK9w@mail.gmail.com>
2011-02-23 10:19       ` Jonathan Wakely

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