www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Just posted: Detailed guide to using Visual D with external library

reply "Lawrence Lewis" <lel486 gmail.com> writes:
After kind of tearing my hair out to get this to work, I created
a guide so others won't have to sweat.

It's Word document in GitHub: git github.com:lel4866/DGuides.git

named "Using a Visual D Project with a Separate D Library.docx"
Jun 12 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 12.06.2014 20:40, Lawrence Lewis wrote:
 After kind of tearing my hair out to get this to work, I created
 a guide so others won't have to sweat.

 It's Word document in GitHub: git github.com:lel4866/DGuides.git

 named "Using a Visual D Project with a Separate D Library.docx"
Thanks for writing this guide. A few comments: - there is a typo "ConsolApp" - the second source for main.d already contains "import lib;" though the text suggests it should not. - link dependencies can be set a bit easier: Open the "Project Dependencies" dialog in the Project menu, and select the ConsoleApp project. Then check the box for the StaticLib project. This will add the StaticLib library to the linker command line of ConsoleApp automatically. I was considering adding the import paths of dependent projects automatically to the dmd command line some time ago, but never got to it. I guess that would be a good addition. I would recommend converting the text to html or similar to make it easier accessible than a docx file. You could even publish it using io-pages on github (see https://help.github.com/categories/20/articles).
Jun 12 2014
next sibling parent "Lawrence Lewis" <lel486 gmail.com> writes:
Rainer -

I added your suggestions. I'll try to add the google html page
over the next couple of days.

Adding import paths of dependent projects would be great.

Larry
Jun 12 2014
prev sibling parent reply "Mathias LANG" <no spam.please> writes:
On Thursday, 12 June 2014 at 20:14:54 UTC, Rainer Schuetze wrote:
 I was considering adding the import paths of dependent projects 
 automatically to the dmd command line some time ago, but never 
 got to it. I guess that would be a good addition.
Definitely ! I was just searching through this forum for this very reason: Created a project, added a library, it doesn't work. Searched a bit and found this, thanks ! Btw, there is also an issue with backslashes: I had to put '$(SolutionDir)\\libdparse\\src\\' (w/out the quotes), as single slashes didn't work.
Jul 21 2014
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 21.07.2014 19:35, Mathias LANG wrote:
 On Thursday, 12 June 2014 at 20:14:54 UTC, Rainer Schuetze wrote:
 I was considering adding the import paths of dependent projects
 automatically to the dmd command line some time ago, but never got to
 it. I guess that would be a good addition.
Definitely ! I was just searching through this forum for this very reason: Created a project, added a library, it doesn't work. Searched a bit and found this, thanks ! Btw, there is also an issue with backslashes: I had to put '$(SolutionDir)\\libdparse\\src\\' (w/out the quotes), as single slashes didn't work.
This is in the import path option? The trailing \ is causing the trouble, you don't need that. But I often prefer forward slashes anyway. ;-) Unfortunately dmd/optlink do not always like these...
Jul 22 2014