User forums > Using Code::Blocks

Using DEF Files with DLL Creation

(1/2) > >>

BigAngryDog:
How does one link in a def file when creating a DLL?

Currently, my def file doesn't seem to have any effect. I particularly want to use it to remove function name decoration.

For example:


--- Code: ---LIBRARY test.dll

EXPORTS
    get_url = get_url@12
    get_urlW = get_urlW@12

--- End code ---

Any help appreciated. :)

Michael:
Hello,

It would be useful if you say which compiler you are using and which C::B version :). Anyway, this link could be useful.

Best wishes,
Michael

BigAngryDog:
Version 1.0 RC2.

Thanks for the reply. However, it doesn't seem that the link has the info I need. It talks of a "dlltool" for creating import libraries. However, it isn't an import library I need. I specifically want to remove the name decoration with the __stdcall calling convention.

I understand that I can do it by adding aliases to a def file. So that:

get_url = get_url@12

But how do I "link in" the def file so that the aliases appear in the export table of the DLL?

I'm not an expert with MingGW from the command line. Is there any way I can add the option to C::B?

mandrav:
Try adding the following in your target's other linker options:

--def test.def
EDIT: if the above doesn't work, try -Wl,--def=test.def

(replacing "test.def" with your def's filename)

Michael:

--- Quote from: BigAngryDog on March 13, 2006, 10:58:50 am ---Version 1.0 RC2.

--- End quote ---

You would might be give a try to a nightly build :).


--- Quote from: BigAngryDog on March 13, 2006, 10:58:50 am ---Thanks for the reply. However, it doesn't seem that the link has the info I need. It talks of a "dlltool" for creating import libraries. However, it isn't an import library I need. I specifically want to remove the name decoration with the __stdcall calling convention.

I understand that I can do it by adding aliases to a def file. So that:

get_url = get_url@12

But how do I "link in" the def file so that the aliases appear in the export table of the DLL?

I'm not an expert with MingGW from the command line. Is there any way I can add the option to C::B?

--- End quote ---

I am not an expert too, but may be this link could help.

Best wishes,
Michael

Navigation

[0] Message Index

[#] Next page

Go to full version