MinGW GCC: DEF file support

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

MinGW GCC: DEF file support

A Alex
Hello Folks,

Does MinGW GCC support DEF files?
I need to prepend each function exported from the DLL with an underscore.

As I realize, there is only one way to achieve that - use DEF file with the map from the mangled '_foo' name to the simple 'foo' name.

Thank you,
Alex.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: MinGW GCC: DEF file support

Yongwei Wu
2008/12/19 A Alex <[hidden email]>:
> Hello Folks,
>
> Does MinGW GCC support DEF files?
> I need to prepend each function exported from the DLL with an underscore.
>
> As I realize, there is only one way to achieve that - use DEF file with the map from the mangled '_foo' name to the simple 'foo' name.

Please check whether this page provided enough information for you:

http://wyw.dcweb.cn/stdcall.htm

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: MinGW GCC: DEF file support

A Alex
In reply to this post by A Alex
Thank you, I've already seen that article at http://www.geocities.com/yongweiwu/stdcall.htm
In fact, DEF file is the solution, but I just haven't seen the GCC's option intended to provide DEF file for input.

But I found out that there is no special option for the DEF file.
Instead, it is must be placed on the command line with no option.
Sample here: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html

On Fri, Dec 19, 2008 at 4:04 PM, Yongwei Wu <> wrote:

    > Hello Folks,
    >
    > Does MinGW GCC support DEF files?
    > I need to prepend each function exported from the DLL with an underscore.
    >
    > As I realize, there is only one way to achieve that - use DEF file with the map from the mangled '_foo' name to the simple 'foo' name.

    Please check whether this page provided enough information for you:

    http://wyw.dcweb.cn/stdcall.htm

    --
    Wu Yongwei
    URL: http://wyw.dcweb.cn/

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: MinGW GCC: DEF file support

Yongwei Wu
2008/12/19 A Alex <[hidden email]>:
> Thank you, I've already seen that article at http://www.geocities.com/yongweiwu/stdcall.htm
> In fact, DEF file is the solution, but I just haven't seen the GCC's option intended to provide DEF file for input.
>
> But I found out that there is no special option for the DEF file.
> Instead, it is must be placed on the command line with no option.

Different tools have different ways. In that article I mentioned ld,
dllwarp, and dlltool:

- ld accepts DEF files directly on the command line
- dllwrap accepts DEF as input by the --def option
- dlltool accepts DEF as input by the --input-def option

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: MinGW GCC: DEF file support

A Alex
In reply to this post by A Alex
As I've realized, dlltool does not modify already prepared dll.
It may modify lib, but not dll. Correct me if I am wrong.

dllwrap have that ability, but it's easier for development process to get prepared dll right from the linker, since I have source code.
 
>
>    Different tools have different ways. In that article I mentioned ld,
    dllwarp, and dlltool:

    - ld accepts DEF files directly on the command line
    - dllwrap accepts DEF as input by the --def option
    - dlltool accepts DEF as input by the --input-def option

    --
    Wu Yongwei
    URL: http://wyw.dcweb.cn/



------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.