Using libraries in VisualD
evilrat666 at gmail.com
Fri Apr 4 02:34:27 PDT 2014
On Friday, 4 April 2014 at 02:56:08 UTC, Zaggy1024 wrote:
> On Friday, 4 April 2014 at 00:44:52 UTC, Mike Parker wrote:
>> On 4/4/2014 8:45 AM, Zaggy1024 wrote:
>>> I tried putting this in the Library Files field in the linker
>>> But when I try using "import dsfml.system.sleep;" to import a
>>> part of
>>> the library, it spouts this:
>>> "main.d(3): Error: module sleep is in file
>>> 'dsfml\system\sleep.d' which
>>> cannot be read"
>>> If anyone knows what I'm doing wrong, I'd appreciate the
>>> help. :)
>> You haven't configured your import path. The libraries are for
>> the linker, but you need the source modules on the import path
>> for the compiler. So assuming C:\dev\source\dsfml, you'll need
>> to put C:\dev\source somewhere in the compiler settings.
> Thanks for the help.
> I put the source location into "Additional Imports", and it
> gave this error:
> "Error 42: Symbol Undefined
> I tried removing the linker's library files, but the error
> stayed the same.
this may means that you must compile that dsfml(?) as library
first and then link it with your code. because adding import
paths only says to compiler that they are exists, but no actual
code generated for them unless you put it in your build. i hope
it clear enough now.
More information about the Digitalmars-d-ide