| 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!
|