public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compilation Errors
@ 2002-08-21  0:06 VallabhaN
  0 siblings, 0 replies; 2+ messages in thread
From: VallabhaN @ 2002-08-21  0:06 UTC (permalink / raw)
  To: gcc-help

Hi All,

     I hitting some compilation errors while compiling a .cpp file. I am using
gcc 3.1 on Red Hat 7.2 (32 bit m/c). The errors says something like;

In file included from /usr/gcc31/include/g++-v3/bits/fpos.h:45,
                 from /usr/gcc31/include/g++-v3/iosfwd:46,
                 from /usr/gcc31/include/g++-v3/streambuf:46,
                 from /usr/gcc31/include/g++-v3/backward/streambuf.h:32,
                 from chatdoc.cpp:14:
/usr/gcc31/include/g++-v3/cwchar:142: `fwide' not declared
/usr/gcc31/include/g++-v3/cwchar:145: `getwc' not declared
/usr/gcc31/include/g++-v3/cwchar:146: `getwchar' not declared
/usr/gcc31/include/g++-v3/cwchar:149: `mbsinit' not declared
/usr/gcc31/include/g++-v3/cwchar:152: `putwchar' not declared
/usr/gcc31/include/g++-v3/cwchar:157: `vfwscanf' not declared
/usr/gcc31/include/g++-v3/cwchar:159: `vswscanf' not declared
/usr/gcc31/include/g++-v3/cwchar:161: `vwscanf' not declared
/usr/gcc31/include/g++-v3/cwchar:176: `wcstof' not declared
/usr/gcc31/include/g++-v3/cwchar:182: `wmemcmp' not declared
/usr/gcc31/include/g++-v3/cwchar:183: `wmemcpy' not declared
/usr/gcc31/include/g++-v3/cwchar:184: `wmemmove' not declared
/usr/gcc31/include/g++-v3/cwchar:185: `wmemset' not declared


     Anything wrong with my gcc installtion?. Looking at these errors I guess
there is nothing wrong with souce file which I am compiling. Any idea how to
solve this?

Thanks
-VN


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

* Compilation errors
@ 2009-07-01 18:04 Marcus Clyne
  0 siblings, 0 replies; 2+ messages in thread
From: Marcus Clyne @ 2009-07-01 18:04 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm trying to create a shared object file calling GCC using execv, but 
am getting some errors.

First - .o creation, using the following options:

---------------------
-fPIC
-o
/tmp/simpl-so/objs/10.o
-I
/simpl/dev/src
-I
/simpl/dev/src/core
-I
/simpl/dev/src/include
-c
/t/bufout.c
-------------------------

This seems to go ok, then calling with the following options:
-------------------------
-v
-shared
-o
/tmp/simpl-so/objs/10.so
/tmp/simpl-so/objs/10.o
-lsimpl
--------------------------
produces:
============
/usr/bin/ld: /tmp/simpl-so/objs/10.o: relocation R_X86_64_32 against `a 
local symbol' can not be used when making a shared object; recompile 
with -fPIC
/tmp/simpl-so/objs/10.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
============
whilst
---------------------------
-fPIC
-v
-shared
-o
/tmp/simpl-so/objs/10.so
/tmp/simpl-so/objs/10.o
-lsimpl
-----------------------------
produces:
============

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc 
--enable-mpfr --with-tune=generic --enable-checking=release 
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
COMPILER_PATH=../lib/gcc/x86_64-linux-gnu/4.3.3/:../lib/gcc/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=../lib/gcc/x86_64-linux-gnu/4.3.3/:../lib/gcc/:/usr/lib/gcc/x86_64-linux-gnu/4.3.3/:../lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:../lib/gcc/x86_64-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-shared' '-o' '/tmp/simpl-so/objs/10.so' 
'-mtune=generic'
 ../lib/gcc/x86_64-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_x86_64 
--hash-style=both -shared -o /tmp/simpl-so/objs/10.so -z relro 
../lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crti.o 
../lib/gcc/x86_64-linux-gnu/4.3.3/crtbeginS.o 
-L../lib/gcc/x86_64-linux-gnu/4.3.3 -L../lib/gcc 
-L/usr/lib/gcc/x86_64-linux-gnu/4.3.3 
-L../lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib -L/lib/../lib 
-L/usr/lib/../lib -L../lib/gcc/x86_64-linux-gnu/4.3.3/../../.. 
/tmp/simpl-so/objs/10.o -lsimpl -lgcc --as-needed -lgcc_s --no-as-needed 
-lc -lgcc --as-needed -lgcc_s --no-as-needed 
../lib/gcc/x86_64-linux-gnu/4.3.3/crtendS.o 
../lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crtn.o
/usr/bin/ld: /tmp/simpl-so/objs/10.o: relocation R_X86_64_32 against `a 
local symbol' can not be used when making a shared object; recompile 
with -fPIC
/tmp/simpl-so/objs/10.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
===============

libsimpl is compiled using fPIC too.

I'm using Ubuntu 9.04 64-bit.  It compiled ok on the 32-bit version.

Can anyone give any guidance on how to solve this?

Thanks,

Marcus Clyne.

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

end of thread, other threads:[~2009-07-01 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-21  0:06 Compilation Errors VallabhaN
2009-07-01 18:04 Compilation errors Marcus Clyne

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