For Programmers: Free Programming Magazines  


Home > Archive > Matlab > October 2006 > MinGW object file -> MEX dll multiple definition errors









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MinGW object file -> MEX dll multiple definition errors
southwesthustla

2006-10-31, 4:07 am

Hi all,
If I use the -shared option, my Pascal object files compile fine
through MinGW gpc.

Then, from the Matlab environment on using the object file combined
with a C-wrapper to create a MEX dll, like so:[color=darkred]

.... it gives these errors:

ALL_PASCAL_OBJECTSmin.o C:\mingw\lib\gcc-lib\mingw32\3.2.3\libgpc.a "


ALL_PASCAL_OBJECTSmin.o:crtstuff.c:(.text+0x0): multiple definition of
`DllMainCRTStartup@12'

c:/mingw/lib/dllcrt2.o:dllcrt1.c:(.text+0x0): first defined here

ALL_PASCAL_OBJECTSmin.o:crtstuff.c:(.text+0x100): multiple definition
of `atexit'

c:/mingw/lib/dllcrt2.o:dllcrt1.c:(.text+0x100): first defined here

ALL_PASCAL_OBJECTSmin.o:crtstuff.c:(.text+0x130): multiple definition
of `_onexit'

c:/mingw/lib/dllcrt2.o:dllcrt1.c:(.text+0x130): first defined here

ALL_PASCAL_OBJECTSmin.o:crtstuff.c:(.text+0x160): multiple definition
of `__do_sjlj_init'

c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/crtbegin.o:crtstuff.c:(.text+0x0):
first defined here


C:\PROGRAM FILES\MATLAB704\BIN\WIN32\MEX.PL: Error: Link of
'wrapsfcn_taskJ.dll' failed.



Has anyone ever had 'multiple definition' errors such as these
(involving the -shared option) with your efforts to link legacy code
(Fortran/Pascal/C/Ada) with matlab/MEX?


Many thanks!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com