Ecere SDK/eC Forums • View topic - How to use .def file in ecere IDE




Ecere SDK/eC Forums

Ecere Developers Community

How to use .def file in ecere IDE

General help with the core C language of which eC is a superset, integrating eC with other languages such as C++ at the C level, using C libraries in eC, etc.

How to use .def file in ecere IDE

Postby fedor_bel » Thu Mar 18, 2010 3:05 pm

Hello,

So the question is in the title. How to use Module-Definition files in ecere IDE?

I need to build a DLL. How can I make use of .def file to list the exported function names, so that I do not have to figure out the decorated (mangled) names (like function1@8)?
fedor_bel
 
Posts: 21
Joined: Sun Mar 14, 2010 4:46 pm

Re: How to use .def file in ecere IDE

Postby jerome » Sat Mar 20, 2010 5:00 pm

Hi,

Sorry I sort of didn't originally see this post. Although the IDE doesn't realy have special functionality for it, you should be able to specify a .def file by adding it to the 'Additional Libraries' box under the 'Linker' tab of the Project Settings dialogs (under Build tab).

See: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/win32.html

This should simply add the .def file to the GCC output line:

gcc -o <output> <objectfiles> <dll name>.def

This link also seems resourceful:

http://www.willus.com/mingw/yongweiwu_stdcall.html

And http://lmgtfy.com/?q=exporting+symbols+.def+mingw

Cheers,

Jerome
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm

Re: How to use .def file in ecere IDE

Postby santy » Sun Mar 21, 2010 3:42 am

Hello
I use pexports.exe utility for creating .def file and after that I create import library.
For example bat file:

pexports %1.dll >%1.def
dlltool -D %1.dll -d %1.def -l lib%1.a
santy
 
Posts: 4
Joined: Fri Mar 19, 2010 10:02 am

Re: How to use .def file in ecere IDE

Postby fedor_bel » Mon Mar 22, 2010 4:58 am

Thank you guys for your answers.

That helps. And thank you, jerome, for learning links - it great to acquire new knowledge on the topic.

One more comment - it would be nice to have a special field in ecere IDE to provide a .def file or at least some hints and explanation, so that people having the same problem would not have to search for a solution so long. Oh, doh, the C/C++ programming is still for geeks. It would be so nice to make it simple for mere mortals by providing easy solutions to the most common configuration issues, like a wizard or something with good explanation on all those small extra options, keys and switches that need to be set or used to achieve some simple goal.

Cheers.
fedor_bel
 
Posts: 21
Joined: Sun Mar 14, 2010 4:46 pm

Re: How to use .def file in ecere IDE

Postby jerome » Mon Mar 22, 2010 11:02 am

It would indeed be a nice to have. I suggest you add a 'feature' request for it on Mantis.
However since we generally use Ecere for writing cross-platform software, we usually do not come across these Windows specific issues of integrating with other MS software. Furthermore there are (sadly) more important bugs to whip in the IDE.

May this forum post however make it easier for mere mortals who shall come across this issue in the future :)

Cheers,

Jerome
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm


Return to C/C++

Who is online

Users browsing this forum: No registered users and 2 guests

cron