Jump to page: 1 2
Thread overview
Using libraries in VisualD
Mar 06, 2014
Nikos
Mar 07, 2014
Rainer Schuetze
Apr 03, 2014
Zaggy1024
Apr 04, 2014
Mike Parker
Apr 04, 2014
Zaggy1024
Apr 04, 2014
evilrat
Apr 04, 2014
Zaggy1024
Apr 04, 2014
evilrat
Apr 05, 2014
evilrat
Apr 05, 2014
Zaggy1024
Apr 05, 2014
evilrat
Apr 05, 2014
Zaggy1024
Apr 05, 2014
evilrat
May 14, 2014
Dmitry
May 17, 2014
evilrat
May 17, 2014
Dmitry
May 17, 2014
evilrat
Jun 06, 2014
Dmitry
March 06, 2014
I can't find how to use other libraries than Phobos in VisualD. How to reference them?
March 07, 2014

On 07.03.2014 00:24, Nikos wrote:
> I can't find how to use other libraries than Phobos in VisualD. How to
> reference them?

If you are building the library yourself in another project in Visual Studio, just add a project dependency and it will be added to the linker command line.

Otherwise you should add it to the "Library Files" option on the linker page of the project configuration.

If you mean to replace the default phobos library, you might have to add -L/NODEFAULTLIB:phobos to the command line.
April 03, 2014
On Friday, 7 March 2014 at 08:09:54 UTC, Rainer Schuetze wrote:
>
>
> On 07.03.2014 00:24, Nikos wrote:
>> I can't find how to use other libraries than Phobos in VisualD. How to
>> reference them?
>
> If you are building the library yourself in another project in Visual Studio, just add a project dependency and it will be added to the linker command line.
>
> Otherwise you should add it to the "Library Files" option on the linker page of the project configuration.
>
> If you mean to replace the default phobos library, you might have to add -L/NODEFAULTLIB:phobos to the command line.

Just thought I'd post this in a related existing thread. I've tried numerous ways to include DSFML (a D binding for SFML), but I can't seem to get it to work. I expect I'm doing something stupid somewhere along the way, but I haven't been able to figure out what.

I tried putting this in the Library Files field in the linker settings:

"C:\DSFML\prebuilt\dsfml-system.lib;C:\DSFML\prebuilt\dsfml-window.lib;C:\DSFML\prebuilt\dsfml-network.lib;C:\DSFML\prebuilt\dsfml-graphics.lib;C:\DSFML\prebuilt\dsfml-audio.lib"

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. :)
April 04, 2014
On 4/4/2014 8:45 AM, Zaggy1024 wrote:

>
> I tried putting this in the Library Files field in the linker settings:
>
> "C:\DSFML\prebuilt\dsfml-system.lib;C:\DSFML\prebuilt\dsfml-window.lib;C:\DSFML\prebuilt\dsfml-network.lib;C:\DSFML\prebuilt\dsfml-graphics.lib;C:\DSFML\prebuilt\dsfml-audio.lib"
>
>
> 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.
April 04, 2014
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 settings:
>>
>> "C:\DSFML\prebuilt\dsfml-system.lib;C:\DSFML\prebuilt\dsfml-window.lib;C:\DSFML\prebuilt\dsfml-network.lib;C:\DSFML\prebuilt\dsfml-graphics.lib;C:\DSFML\prebuilt\dsfml-audio.lib"
>>
>>
>> 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 _D5dsfml6system5sleep12__ModuleInfoZ"

I tried removing the linker's library files, but the error stayed the same.
April 04, 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 settings:
>>>
>>> "C:\DSFML\prebuilt\dsfml-system.lib;C:\DSFML\prebuilt\dsfml-window.lib;C:\DSFML\prebuilt\dsfml-network.lib;C:\DSFML\prebuilt\dsfml-graphics.lib;C:\DSFML\prebuilt\dsfml-audio.lib"
>>>
>>>
>>> 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 _D5dsfml6system5sleep12__ModuleInfoZ"
>
> 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.
April 04, 2014
On Friday, 4 April 2014 at 09:34:29 UTC, evilrat wrote:
>
> 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.

Isn't that what putting the path to the prebuilt .lib files in the linker configuration does?
April 04, 2014
On Friday, 4 April 2014 at 15:58:47 UTC, Zaggy1024 wrote:
> On Friday, 4 April 2014 at 09:34:29 UTC, evilrat wrote:
>>
>> 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.
>
> Isn't that what putting the path to the prebuilt .lib files in the linker configuration does?

"import path" is for .d/.di files, library path is for .lib
April 05, 2014
On Friday, 4 April 2014 at 16:44:07 UTC, evilrat wrote:
> On Friday, 4 April 2014 at 15:58:47 UTC, Zaggy1024 wrote:
>> On Friday, 4 April 2014 at 09:34:29 UTC, evilrat wrote:
>>>
>>> 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.
>>
>> Isn't that what putting the path to the prebuilt .lib files in the linker configuration does?
>
> "import path" is for .d/.di files, library path is for .lib

sorry for such obvious comment. i must say that library files is full path or just filename.lib, and library search path is where .lib's can be found. and keep in mind that most(if not all) project options are delimited with spacebars only, not semicolon.

so if you have such paths like
"C:\Some Location\lib;D:\other\lib"
you shold try to split them like this
"C:\Some Location\lib" D:\other\lib
April 05, 2014
On Saturday, 5 April 2014 at 03:41:21 UTC, evilrat wrote:
>
> sorry for such obvious comment. i must say that library files is full path or just filename.lib, and library search path is where .lib's can be found. and keep in mind that most(if not all) project options are delimited with spacebars only, not semicolon.
>
> so if you have such paths like
> "C:\Some Location\lib;D:\other\lib"
> you shold try to split them like this
> "C:\Some Location\lib" D:\other\lib

I guess I should just show you how I have it set up right now...

Compiler config:
http://i.imgur.com/laRKpZM.png

Linker config:
http://i.imgur.com/CBdzNCO.png

If I'm correct, it should be finding the .lib files from C:/DSFML/prebuilt, and the source in /src. Am I doing something wrong?
« First   ‹ Prev
1 2