unknown reference _GLOBAL_OFFSET_TABLE_

Hi,
I am using the gcc compiler with wlink and I am trying to compile Qt 2.3.1
on QNX 4.23. When creating an executable I get this unknown reference. I
have a feeling it has to do with the compiler flag: -fPIC …

My compile line looks like:
gcc -fPIC -DHAVE_UNISTD_H -DUSE_MMAP -o example example.o -L. -lz

I have tried to compile without the -fPIC and I get the same warning. This
is 3rd party software which QT includes that I am trying to compile.

Any ideas would be greatly appreciated.

Mia

Hi Frank, thanks for responding.

I am linking to the X libraries to compile Qt. The warning message is this:
Warning(1028): GLOBAL_OFFSET_TABLE is an undefined reference

I am guessing that the gcc compiler is using this global table and wlink
does not and I am looking for a way around this predicament. I am using
gcc-lib version 2.8.1

Mia


“Frank Liu” <liug@mama.indstate.edu> wrote in message
news:a14jre$2ks$1@inn.qnx.com

Mia Kroll <> mkroll@atsautomation.com> > wrote:
Hi,
I am using the gcc compiler with wlink and I am trying to compile Qt
2.3.1
on QNX 4.23. When creating an executable I get this unknown reference. I

which unknown reference?
btw, the -fPIC is not supported in QNX4. don’t use it.
Qt may require xfree86 to compile.

frank

have a feeling it has to do with the compiler flag: -fPIC …

My compile line looks like:
gcc -fPIC -DHAVE_UNISTD_H -DUSE_MMAP -o example example.o -L. -lz

I have tried to compile without the -fPIC and I get the same warning.
This
is 3rd party software which QT includes that I am trying to compile.

Any ideas would be greatly appreciated.

Mia