www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Trouble linking to static library with Visual D

reply "quakkels" <_ example.com> writes:
Hello D'ers,

I've been really impressed with Visual D and I've decided to 
undertake my first D project using Visual D in Visual Studio 
2012. However, I've had trouble trying to figure out how to link 
a static library.

I've outlined my situation in this Stack Overflow question.

     
http://stackoverflow.com/questions/25071649/how-to-link-to-packages-in-static-libraries-using-visual-d

I would very much appreciate any insight into what I can do to 
correct the described behavior.

Thanks,
quakkels
Aug 01 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 02.08.2014 04:43, quakkels wrote:
 Hello D'ers,

 I've been really impressed with Visual D and I've decided to undertake
 my first D project using Visual D in Visual Studio 2012. However, I've
 had trouble trying to figure out how to link a static library.

 I've outlined my situation in this Stack Overflow question.

 http://stackoverflow.com/questions/25071649/how-to-link-to-packages-in-static-libraries-using-visual-d


 I would very much appreciate any insight into what I can do to correct
 the described behavior.

 Thanks,
 quakkels
Your request.d should declare the full module name including the package: module codecramlib.http.request; Then import it with this name from package.d: import codecramlib.http.request; When you get to the link stage, you'll probably run into undefined symbols: you'll have to add a dependency in the "Project Dependencies" dialog to add the static library to the linker command line of the executable.
Aug 02 2014
parent "quakkels" <_ example.com> writes:
 When you get to the link stage, you'll probably run into 
 undefined symbols: you'll have to add a dependency in the 
 "Project Dependencies" dialog to add the static library to the 
 linker command line of the executable.
Thank you for that tip! After a fair bit of frustration (and your help) I've finally got it working!
Aug 02 2014