VisualD Projects

Mr.Bingo Bingo at Namo.com
Thu Jul 12 02:51:10 UTC 2018


On Thursday, 12 July 2018 at 02:08:55 UTC, Samsinsane wrote:
> On Wednesday, 11 July 2018 at 16:28:42 UTC, Mr.Bingo wrote:
>> You'll have to work that out on your own.
>
> My apologies, I thought this was the place to ask for help 
> using VisualD.
>
No, I said it is something that you have to figure out! It 
depends on your specific setup but I have had this problem before 
I I'm offering general pointers to try. But ultimately you are 
going to have to dig around your system to find the files and fix 
the links.

>> Can you use dmd from the command line just fine?
>
> VisualD builds the mixed project hello world just fine. I can 
> run 'dmd' from the command line, but I'm not really sure how to 
> use it as I'm new to D.
>
>> Can you use dub just fine? Does a dub generated visual D 
>> project have the same issues?
>
> The DUB generated VisualD project is an old format, and only 
> contains vibe.d?

You can use dub to generate a visual D project file that you can 
then open up in visual studio and it should all be setup to work. 
You will need to read the dub documentation figure it out... it's 
there, just look for it. If you are going to invest some time in 
visual D expect to have to get familiar with finding information. 
D is a great language but the tooling is lacking in many areas. 
It all works but if you are not lucky you will have issues.

>
>> Do you have Visual D's library import paths(both at the 
>> configuration page and the options page) set properly to what 
>> they are suppose to be?
>
> I added 15 import paths in my VisualD project for vibe.d. It 
> started off complaining about missing import paths, so I added 
> them until it compiled but failed to link. Then I couldn't 
> figure out what to do.
>

Import's are for using D's module import and are not very 
importing the libraries that contain the symbols that ar missing.

.lib files have the "symbols"(usually functions) that are 
actually called(the binary machine code). You have to link in the 
vibed.lib and all the others that are necessary.

If you create a dub project and add the vibed dependency then use 
dub to compile the program it should download and compile vibed, 
you can then use those libs in the visual D settings.


>> With missing symbols it can be a real pain to find out what is 
>> going on. Sometimes the distributions get corrupted somehow 
>> and the libraries simply don't work.
>
> What do you mean the distributions get corrupted? Is this 
> common in the D ecosystem? Will my projects get corrupted 
> randomly?

No, your projects will be fine. Every once in things happen 
though. You seem to get frightened easily, D might not be the 
thing for you.

You know you can use it online to try things out to see if you 
like it:


https://dpaste.dzfl.pl/new

or

https://run.dlang.io/


>> Look at the symbol names and you can usually get some idea. If 
>> it's a vibe.d issue only(create a new hello world project and 
>> see if the same symbols are missing) then you probably have 
>> not included vibe.d's libraries.
>
> Sorry, I tried not to write an excessive amount since I was 
> mostly just wanting to know how to link a D library in VisualD. 
> All of the symbol names are vibe.d related, but when I build 
> the vibe.d solution (two of the 19 projects fail), but I link 
> to 'vibed.lib' and it says that it is corrupted or invalid.
>

That would explain it. You might want to ask on the vibe.d forum 
since this is related to vibe.d more than D.

>> you can use dub to create a new visual D project with vibe D 
>> in it.
>
> DUB doesn't generate mixed projects though?

I don't think so. That might need to be addressed.

>
> Thanks for taking the time to respond to my query. I'm getting 
> the impression that linking D libraries in VisualD isn't 
> possible. Thanks anyway!

No, it's very easy with pragma(lib or -l

/OUT:"App.exe" /MANIFEST /NXCOMPAT /PDB:"App.pdb" /DYNAMICBASE 
"kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" 
"comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" 
"oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG 
/MACHINE:X86 /INCREMENTAL /PGD:"App.pgd" /SUBSYSTEM:CONSOLE 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
/ManifestFile:"App.exe.intermediate.manifest" /ERRORREPORT:PROMPT 
/NOLOGO /TLBID:1

This is the linker output, notice how visual D has automatically 
added the lib's. Yours should be similar but have the vibed libs. 
If you failed to compile it then the lib doesn't exist so the 
symbols will be missing.



More information about the Digitalmars-d-ide mailing list