How to get Visual D working with Derelict2?
Chris Pons
cmpons at gmail.com
Thu Feb 16 10:48:49 PST 2012
On Thursday, 16 February 2012 at 16:25:04 UTC, Mike Parker wrote:
> On 2/16/2012 5:39 AM, Chris Pons wrote:
>> Hey everyone,
>> I am new to D, and interested in using it with Derelict2 for
>> game
>> development. I plan on using Visual D, which I have installed
>> already. I
>> used the visual studio 2008 solution file to build the
>> libraries and the
>> .di files but unfortunately I do not know where to put these
>> files once
>> built or alternatively setup Visual D to recognize their
>> location.
>
> Right click on your project in the Solution Explorer, select
> "Properties", then "Configuration Properties"->DMD. Enter the
> path (absolute or relative) to your import directory (ex: if
> the DerelictUtil modules are in C:\foo\derelict\util, you would
> add C:\foo as the import path).
>
> Now select "Configuration Properties"->Linker and enter the
> libraries in Library Files. You'll need to include the path
> like so:
>
> C:\foo\libs\DerelictUtil.lib C:\foo\libs\DerelictGL.lib
>
> Alternatively, you can add the following to the top of your
> source module:
>
> pragma(lib, "C:\foo\libs\DerelictUtil.lib");
> pragma(lib, "C:\foo\libs\DerelictGL.lib");
> ...
>
> Makes sure to add every lib you need to link with.
>
>>
>> Lastly, how would I import these libraries in the code?
>
> You don't import "libraries". You import "modules". The import
> statement tells DMD which source modules to look in for
> external declarations. It has absolutely nothing to do with
> library files. And if the root directory for the module package
> is not on the import path, it won't be able to find them.
Thank you for helping a newbie! Much appreciated!
More information about the Digitalmars-d-learn
mailing list