Re: How to setup GDC with Visual D?

2015-07-04 Thread Marko Grdinic via Digitalmars-d-learn

On Friday, 3 July 2015 at 23:45:15 UTC, Guy Gervais wrote:

On Friday, 3 July 2015 at 19:17:28 UTC, Marko Grdinic wrote:

Any advice regarding how I can get this to work? Thanks.


I got GDC to work with VS2013 + VisualD by going into 
Tools-Options (The VS menu, not the one under Visual D) 
and adding the paths under Projects and Solutions - Visual D 
Settings - GDC Directories. I put the path to the bin folder 
in MinGW64 and the bin folder in GDC.


I get a 10%-15% speed improvement, which is nice, but my 
binaries are 10 times larger.


I have no idea where Visual D is supposed to be looking at, but I 
managed to get it to work by adding the Gdc/bin directory into 
path. With that it finds it anywhere.


How to setup GDC with Visual D?

2015-07-03 Thread Marko Grdinic via Digitalmars-d-learn
DMC works fine, but when I try to compile using GDC it seems it 
can't find the compiler:


Building Release GDC x64\ConsoleApp1.exe...
failed launching gdc -m64 -O3 -frelease -fXf=Release GDC 
x64\ConsoleApp1.json -fdeps=Release GDC x64\ConsoleApp1.dep -o 
Release GDC x64\ConsoleApp1.exe main.d

Building Release GDC x64\ConsoleApp1.exe failed!

I've tried setting the GDC directory to different levels in the 
tree, but it gives me the same error regardless. I haven't tried 
adding GDC binaries to the PATH yet, but I am not sure whether I 
should. I am (trying) to use the latest unsupported alpha build 
because the supported version in from 2013 and so I am unsure 
whether I should use it.


I only dabbled in D a few months ago when I was writing the 
compiler project for the online course, but did not study it 
much. Lately though, I've been trying to solve a tough problem on 
CodeChef and F# is 4x slower than the C++ version on the online 
judge which makes all my solutions time out. It would have been 
fine had it been only 2x just as it is on my machine locally.


At any rate, as I've acquired the functional programming style 
recently, I do not want to go back to writing C++ unless I am 
forced to and I know GDC can match it in speed based on what I've 
read on the web.


Any advice regarding how I can get this to work? Thanks.


Cannot find -lphobos

2015-05-10 Thread Marko Grdinic via Digitalmars-d-learn
I works just fine on Windows, but I am having difficulty figuring 
out what the trouble is on my Bodhi 1.4 Virtual Box. I've 
followed the instruction on the Codeblocks Wiki and set the 
parameters, but when I try to compile, it complains that it can't 
find Phobos.


/usr/bin/ld: cannot find -lphobos2

I've checked the search directories and the library directories 
are where it says they would be. I am not particularly familiar 
with Linux so I am not sure how to proceed from here.


Any advice?


Re: Cannot find -lphobos

2015-05-10 Thread Marko Grdinic via Digitalmars-d-learn
Your advice worked, thanks. It turns out that from the command 
line it compiles and links just fine.


Codeblocks is the thing that is giving me trouble. It might have 
something to do that I am using the old Codeblocks 8.0 version. I 
would like to get the newest version but the Virtual Box OS is 
outdated and the package manager won't let me get anything newer.


I downloaded the Codeblocks 13 tar manually and unpacked it, but 
Gdebi can't resolve the missing dependencies (even though they 
are right there in the directory.) It worked fine for Dmd.


Any advice for this?

On Sunday, 10 May 2015 at 15:33:24 UTC, weaselcat wrote:

On Sunday, 10 May 2015 at 14:41:17 UTC, Ali Çehreli wrote:

On 05/10/2015 12:45 AM, Marko Grdinic wrote:
I works just fine on Windows, but I am having difficulty 
figuring out
what the trouble is on my Bodhi 1.4 Virtual Box. I've 
followed the
instruction on the Codeblocks Wiki and set the parameters, 
but when I

try to compile, it complains that it can't find Phobos.

/usr/bin/ld: cannot find -lphobos2

I've checked the search directories and the library 
directories are
where it says they would be. I am not particularly familiar 
with Linux

so I am not sure how to proceed from here.

Any advice?


dmd's -v flag may give some clues:

 $ dmd foo.d -v

dmd outputs the config file that it uses and the linker flags 
that it passes.


Ali


additionally if not using dmd it may have the libraries named 
differently.
a quick google says Bodhi linux is based on Ubuntu which 
doesn't ship dmd due to licensing issues AFAIK.