Thread overview
dmd2 mac os x compilation problem
Sep 08, 2013
Batuhan Göksu
Sep 08, 2013
Lionello Lunesu
Sep 08, 2013
Nick Sabalausky
Sep 08, 2013
Paolo Invernizzi
Sep 08, 2013
Batuhan Göksu
Sep 08, 2013
Jacob Carlborg
September 08, 2013
Hi Friends,

dmd2 files downloaded at this address.

I took the files to the destination directory in this way.

/usr/dmd2
/usr/dmd2/bin
/usr/dmd2/lib
/usr/dmd2/man
/usr/dmd2/src

edited config file.

[Environment]

DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import -L/usr/dmd2/lib

A simple example code.

import std.stdio;

void main()
{
    writeln("Hello World");
}

Giving this error when I want to compile.

ld: library not found for -lphobos2
collect2: ld returned 1 exit status
--- errorlevel 1

needed to do to solve this problem?

.dmg file in the destination directory and the installation does not want to set up.

sincerely.
September 08, 2013
On 9/8/13 18:56, "Batuhan Göksu" <batuhangoksu@gmail.com>" wrote:
> Hi Friends,
>
> dmd2 files downloaded at this address.
>
> I took the files to the destination directory in this way.
>
> /usr/dmd2
> /usr/dmd2/bin
> /usr/dmd2/lib
> /usr/dmd2/man
> /usr/dmd2/src
>
> edited config file.
>
> [Environment]
>
> DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import
> -L/usr/dmd2/lib
>
> A simple example code.
>
> import std.stdio;
>
> void main()
> {
>      writeln("Hello World");
> }
>
> Giving this error when I want to compile.
>
> ld: library not found for -lphobos2
> collect2: ld returned 1 exit status
> --- errorlevel 1
>
> needed to do to solve this problem?
>
> .dmg file in the destination directory and the installation does not
> want to set up.
>
> sincerely.

Can you try with -m64? You might only have the 64-bit phobos library.

L.
September 08, 2013
On Sun, 08 Sep 2013 12:56:09 +0200
"Batuhan Göksu" <batuhangoksu@gmail.com> wrote:
> [Environment]
> 
> DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import -L/usr/dmd2/lib
> 

I'm not on Posix ATM, but I think that last arg is supposed to be: -L-L/usr/dmd2/lib

September 08, 2013
On Sunday, 8 September 2013 at 12:00:22 UTC, Nick Sabalausky wrote:
> On Sun, 08 Sep 2013 12:56:09 +0200
> "Batuhan Göksu" <batuhangoksu@gmail.com> wrote:
>> [Environment]
>> 
>> DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import -L/usr/dmd2/lib
>> 
>
> I'm not on Posix ATM, but I think that last arg is supposed to be:
> -L-L/usr/dmd2/lib

Yes, it should be -L-L (double checked right now in my OS X).

- Paolo
September 08, 2013
On Sunday, 8 September 2013 at 10:56:11 UTC, Batuhan Göksu wrote:

> .dmg file in the destination directory and the installation does not want to set up.

What errors do you get using the installer?

-
/Jacob Carlborg
September 08, 2013
On Sunday, 8 September 2013 at 12:00:22 UTC, Nick Sabalausky wrote:
> On Sun, 08 Sep 2013 12:56:09 +0200
> "Batuhan Göksu" <batuhangoksu@gmail.com> wrote:
>> [Environment]
>> 
>> DFLAGS=-I/usr/dmd2/src/phobos -I/usr/dmd2/src/druntime/import -L/usr/dmd2/lib
>> 
>
> I'm not on Posix ATM, but I think that last arg is supposed to be:
> -L-L/usr/dmd2/lib

Thank you, Nick Sabalausky

Now seamlessly compiling.