Subject: Re: DLL Build issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Subject: Re: DLL Build issues

Robert Cavanaugh
Hi,
Wanted to report progress and request some additional expertise. 
Taking into account all comments to date
 (thank you all) I have made the following changes to the link command line:
(new lines inserted to conform to mailing list width request)

gcc -shared -g -shared-libgcc  -Wl,--compat-implib -Wl,--out-implib,millisec.lib  
--enable-auto-import --enable-runtime-pseudo-reloc --enable-extra-pe-debug 
-Wl,--no-demangle  millisec.o -L/c/mingw/lib -L/c/mingw/mingw32/lib -L 
-L/c/mingw/x86_64-w64-mingw32/lib -L/usr/local/lib -L/usr/lib -L.  
-L../..  -L../../../armulif/armulif.b/intelrel -L../../../rdi/rditools.b/intelrel 
-L../../../clx/clx.b/intelrel -Wl,--start-group -lclx -larmulif -lrditools -lsordi -Wl,--end-group  -o millisec.dll

(Note that I am using --start-group and --end-group to get the linker to search the archive files as
needed.) I made the library names gcc-friendly by copying them into the conventional format,
e.g. cp armulif.lib libarmulif.a
I expanded the library search path, maybe too much?
I also needed to change the link order to have my object file come before the library
to force it to link the data in the library. Below is the current output:

Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:MSVCRT ' unrecognized
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Cannot export ??_C@_00A@?$AA@: symbol not found
Cannot export ??_C@_01FAJB@?$DL?$AA@: symbol not found
Cannot export ??_C@_01PCFE@?2?$AA@: symbol not found
Cannot export ??_C@_02DILL@?$CFs?$AA@: symbol not found
Cannot export ??_C@_02EEBO@HI?$AA@: symbol not found
Cannot export ??_C@_02HAKO@ON?$AA@: symbol not found
Cannot export ??_C@_02MECO@?$CFd?$AA@: symbol not found
Cannot export ??_C@_02MMJD@NO?$AA@: symbol not found
Cannot export ??_C@_02OBMG@LO?$AA@: symbol not found
Cannot export ??_C@_03CMJG@OFF?$AA@: symbol not found
Cannot export ??_C@_03FOIC@BUS?$AA@: symbol not found
Cannot export ??_C@_03HDMP@YES?$AA@: symbol not found
Cannot export ??_C@_03HKLE@LOW?$AA@: symbol not found
Cannot export ??_C@_03JFOM@?$CFld?$AA@: symbol not found
Cannot export ??_C@_03JGAL@?$CFlu?$AA@: symbol not found
Cannot export ??_C@_03MCHI@?$CFlx?$AA@: symbol not found
Cannot export ??_C@_04DJE@HIGH?$AA@: symbol not found
Cannot export ??_C@_04JHGF@BASE?$AA@: symbol not found
Cannot export ??_C@_04LDGC@FCLK?$AA@: symbol not found
Cannot export ??_C@_04LNAG@TRUE?$AA@: symbol not found
Cannot export ??_C@_04LNMG@PATH?$AA@: symbol not found
Cannot export ??_C@_04NEFN@SIZE?$AA@: symbol not found
Cannot export ??_C@_04OMIB@MASK?$AA@: symbol not found
Cannot export ??_C@_04PGAE@MCLK?$AA@: symbol not found
Cannot export ??_C@_05DGID@CLOCK?$AA@: symbol not found
Cannot export ??_C@_05ENFD@MCCFG?$AA@: symbol not found
Cannot export ??_C@_05JBCJ@META_?$AA@: symbol not found
Cannot export ??_C@_05KEJO@?$CFs?2?$CFs?$AA@: symbol not found
Cannot export ??_C@_05KNAP@RANGE?$AA@: symbol not found
Cannot export ??_C@_05LLOB@FALSE?$AA@: symbol not found
Cannot export ??_C@_05OGKG@?$CFs?4?$CFs?$AA@: symbol not found
Cannot export ??_C@_05OHCF@HASPU?$AA@: symbol not found
Cannot export ??_C@_06FCPC@HASMMU?$AA@: symbol not found
Cannot export ??_C@_06NMBN@ARMLIB?$AA@: symbol not found
Cannot export ??_C@_07MNHB@?$CFlu?0?$CFlu?$AA@: symbol not found
Cannot export ??_C@_08CLID@EMULATED?$AA@: symbol not found
Cannot export ??_C@_08KPFC@?$CFs?2?$CFs?4?$CFs?$AA@: symbol not found
Cannot export ??_C@_08LAHB@HASTCRAM?$AA@: symbol not found
Cannot export ??_C@_08PCNK@CPUSPEED?$AA@: symbol not found
Cannot export ??_C@_0BB@EBJD@DEFAULT_CPUSPEED?$AA@: symbol not found
Cannot export ??_C@_0BD@POD@TARGET_CONSOLE_POS?$AA@: symbol not found
Cannot export ??_C@_0BG@DABO@TARGET_CONSOLE_MAXPOS?$AA@: symbol not found
Cannot export ??_C@_0DO@INCM@Range?3Mask?5?$CI?$CF08lx?$CJ?5has?5zeros?5whi@: symbol not found
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/crtbegin.o:cygming-crtbegin.c:(.text+0x13): undefined reference to `___register_frame_info'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/crtbegin.o:cygming-crtbegin.c:(.text+0xa3): undefined reference to `___deregister_frame_info'
collect2.exe: error: ld returned 1 exit status
make: *** [millisec.dll] Error 1

Running some of the symbols through c++filt had no effect. 
I added "--no-demangle" to the command line in an
attempt to resolve the export error messages. The same errors occur regardless
of whether that switch is present.
Therefore I need to repeat a previous question: Am I now running into a situation
where the pre-compiled binary symbol names are not compatible with GCC?

Is there a utility like nm that can generate a de-mangled equivalent library file?

Thanks,


Bob Cavanaugh


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...