Re: Confusing undefined function which I know is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10 November 2013 20:52, awsdert wrote:
> It shouldn't be a linker issue given that it is being compiled into 1 DLL at
> the moment, also I thought I had sent the output, shows up here:
> http://gcc.1065356.n5.nabble.com/Confusing-undefined-function-which-I-know-is-defined-td983603.html#a983627
> where the problem was originally posted. If there is something else I'm
> looking for to send you then please tell me.

It doesn't show up in the official list archives:
http://gcc.gnu.org/ml/gcc-help/2013-11/msg00061.html

Nabble.com is not the home of this list, and apparently doesn't
accurately forward what you posted.

For the benefit of this list:

-------------- Build: msw86d_cpp_gcc in zxStuff (compiler: GNU GCC
Compiler)---------------

mingw32-gcc.exe -ansi -D_DLL -D_UNICODE -DUNICODE  -shared -D_WIN32
-DZXBUILD_DLL -D_WINDLL    -Iinclude -I  -c
C:\Me\Prjs\cpp\zxStuff\svn\trunk\src\zx\endian\zxcopy.c -o
.objs\src\zx\endian\zxcopy.o
mingw32-gcc.exe -ansi -D_DLL -D_UNICODE -DUNICODE  -shared -D_WIN32
-DZXBUILD_DLL -D_WINDLL    -Iinclude -I  -c
C:\Me\Prjs\cpp\zxStuff\svn\trunk\src\zx\endian\zxcopybits.c -o
.objs\src\zx\endian\zxcopybits.o
mingw32-gcc.exe -ansi -D_DLL -D_UNICODE -DUNICODE  -shared -D_WIN32
-DZXBUILD_DLL -D_WINDLL    -Iinclude -I  -c
C:\Me\Prjs\cpp\zxStuff\svn\trunk\src\zx\endian\zxIntEndian.c -o
.objs\src\zx\endian\zxIntEndian.o
mingw32-gcc.exe -ansi -D_DLL -D_UNICODE -DUNICODE  -shared -D_WIN32
-DZXBUILD_DLL -D_WINDLL    -Iinclude -I  -c
C:\Me\Prjs\cpp\zxStuff\svn\trunk\src\zx\event\zxEVENT.c -o
.objs\src\zx\event\zxEVENT.o
C:\Users\Lee\AppData\Local\Temp\cczuTp1t.o:zxEVENT.c:(.data+0xfc):
undefined reference to `zxVECTOR_resize'
C:\Users\Lee\AppData\Local\Temp\cczuTp1t.o:zxEVENT.c:(.data+0x100):
undefined reference to `zxVECTOR_opAdd'
c:/apps86/tools/codeblocks12-11/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:
C:\Users\Lee\AppData\Local\Temp\cczuTp1t.o: bad reloc address 0x100 in
section `.data'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
2 errors, 0 warnings (0 minutes, 3 seconds)


As I thought, the errors shown are linker errors, not compiler errors.
 You are using -shared to compile single object files, that is wrong.
You probably want to use -fPIC to compile each file, then use -shared
to combine them into a single .dll file.  So your codeblocks settings
must be wrong, but that is not a GCC problem so this is the wrong
mailing list.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux