FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linking problems: where to find the libraries?

 
Post new topic   Reply to topic     Forum Index -> Bindings
View previous topic :: View next topic  
Author Message
CyberShadow
Site Admin


Joined: 29 Dec 2006
Posts: 21
Location: Moldova, Eastern Europe

PostPosted: Wed Jan 09, 2008 8:32 am    Post subject: Linking problems: where to find the libraries? Reply with quote

Hello,

I'm having some problems with linking my application. The problem is that although the WindowsAPI project has the headers for everything, there's still the problem with the libraries. DM's and DMD's libs are obviously sub par, and I'm not sure of the right way to make my own. Using implib creates unusable libraries - OPTLINK keeps looking for names such as "_SQLGetInstalledDrivers@12", and DLLs don't have the argument information (stuff after @), and I don't know how to make OPTLINK ignore it. So far the only solution I can think of is writing my own .DEF files by hand.
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Wed Jan 09, 2008 10:30 am    Post subject: Re: Linking problems: where to find the libraries? Reply with quote

CyberShadow wrote:
Hello,

I'm having some problems with linking my application. The problem is that although the WindowsAPI project has the headers for everything, there's still the problem with the libraries. DM's and DMD's libs are obviously sub par, and I'm not sure of the right way to make my own. Using implib creates unusable libraries - OPTLINK keeps looking for names such as "_SQLGetInstalledDrivers@12", and DLLs don't have the argument information (stuff after @), and I don't know how to make OPTLINK ignore it. So far the only solution I can think of is writing my own .DEF files by hand.


I've put some .def files into the SVN, such as:
http://www.dsource.org/projects/bindings/browser/trunk/def/odbc32.def

(jjr has helped out, too.)

I may have written some of them by hand, but I think I converted most of them from another format. If my files are lacking any definitions please feel free to add them and commit the changes to the SVN.

Also, I created a page about .def files: http://www.dsource.org/projects/bindings/wiki/DefFiles
Back to top
View user's profile Send private message AIM Address
CyberShadow
Site Admin


Joined: 29 Dec 2006
Posts: 21
Location: Moldova, Eastern Europe

PostPosted: Wed Jan 09, 2008 11:06 am    Post subject: Reply with quote

Thanks, I appreciate that Smile

Two more questions:
1) I noticed that on the Wiki page you mentioned how to create import libraries from DLLs. I'm wondering if this is of any use when linking to D code? As I understood it, DMD creates linkage symbols in the form _function@argsize, and there's no way to get the argsize thing from the DLL. Theoretically the linker could discard the part after @, but OPTLINK doesn't seem to be able to do that?

2) I noticed that when importing win32.windows, there are always some linker warnings about missing libs: mpr.lib, advapi.lib, imm32.lib, lz32.lib, rpcns4.lib. I guess those are specific to mingw?
Back to top
View user's profile Send private message
yidabu



Joined: 21 Apr 2007
Posts: 87

PostPosted: Mon Apr 07, 2008 5:45 am    Post subject: Reply with quote

some Windows libs under DWin.lib
_________________
D yuyan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Bindings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group