Re: Installing DMD on linux via snap

2022-05-18 Thread Jordi Sayol via Digitalmars-d-learn

El 18/5/22 a les 17:24, matheus via Digitalmars-d-learn ha escrit:


Yesterday I needed to install DMD on a fresh installed version of Linux, so 
since I was using Xubuntu I decided to use snap.





$ sudo wget https://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
/etc/apt/sources.list.d/d-apt.list

$ sudo apt update --allow-insecure-repositories && sudo apt -y --allow-unauthenticated 
install --reinstall d-apt-keyring && sudo apt update

then just install:

$ sudo apt install dmd-compiler dmd-tools dmd-doc dub


Re: Offline D documentation/tutorial

2022-02-13 Thread Jordi Sayol via Digitalmars-d-learn

El 13/2/22 a les 12:22, frame via Digitalmars-d-learn ha escrit:

On Sunday, 13 February 2022 at 00:17:26 UTC, rikki cattermole wrote:

There are some files available at https://d-apt.sourceforge.io/


It would also nice to have a up-to-date CHM version of 
https://github.com/a11e99z/DlangChm

Are there any compiled sources?



In  there are CHM, EPUB, MOBI and PDF up to date


Re: MobI? Really?

2021-09-18 Thread Jordi Sayol via Digitalmars-d-learn

El 18/9/21 a les 22:40, Chris_D via Digitalmars-d-learn ha escrit:

The "D Programming Language Specification" seems to be the most important 
documentation for D.  Is it really only available as Mobi?  That is the most bizarre 
choice of format I've ever seen.

   Chris




https://d-apt.sourceforge.io/




Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-28 Thread Jordi Sayol via Digitalmars-d-learn
El 25/9/19 a les 13:46, Ron Tarrant via Digitalmars-d-learn ha escrit:
> Hi y'all,
> 
> I've been Googling how to do this, but coming up with nothing definitive. Are 
> there any articles for how to do this for:
> 
> Windows?
> Linux?
> other UNIX-alike OSs?

On Bebian/Ubuntu/Linux Mint, You have "d-apt" 

If you static links your d program, you don't need any package from it at 
runtime.
But if you dynamic links it, you've runtime libraries for GtkD "libgtkd3-nn" 
and TkD "libtkd-nn" on "d-apt".
"nn" on library name should be replaced with the DMD major version (without 
initial zero). 
i.e. For the last DMD version, "libgtkd3-88" or "libtkd-88".


Re: Linux & DMD & GtkD

2019-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 17/2/19 a les 15:19, Jordi Sayol ha escrit:
> Then you can compile/run a GtkD example contained on gtkd doc archive. To do 
> that just run the next line:
> 
> $ dmd `pkg-config --cflags --libs gtkd-3` -run 
> /usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow

Sorry, do not run at compile time. Just remove "-run" to properly compile the 
example:

$ dmd `pkg-config --cflags --libs gtkd-3` 
/usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow

> 
> 
> To run the compiled example just type:
> 
> $ ./TestWindow

Regards,
Jordi


Re: Linux & DMD & GtkD

2019-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 16/2/19 a les 14:35, Ron Tarrant via Digitalmars-d-learn ha escrit:
> Hi guys,
> 
> I finally got a Linux Mint installation happening (very impressed, BTW) and 
> did the usual HelloWorld.d compile with dmd, but I'm having trouble working 
> out how to link to GtkD.
> 
> dmd -de -w -m64 -L+gtkd hello_gtkd_world.d
> 
> says it can't find MainWindow which tells me the gtkd libraries are not 
> installed, are not included in the path, or some other oversight on my part.
> 
> I tried using whereis to find gtkd, but to no avail.
> 
> Questions:
> 
> 1. Am I using the right syntax in the above command line?
> 
> 2. How to search for things on Linux Mint
> 
> The recommendations I've found so far are for the gnome search tool which 
> spits out an error:
> 
> Package gnome-search-tool is not available, but is referred to by another 
> package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> 

Hello Ron,

There is "d-apt"  where there are dmd and gtkd 
deb for Linux Mint.

To add this repository to your Linux Mint just run this two lines from command 
line:

$ sudo wget 
https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
/etc/apt/sources.list.d/d-apt.list

$ sudo apt-get update --allow-insecure-repositories && sudo apt-get -y 
--allow-unauthenticated install --reinstall d-apt-keyring && sudo apt-get update

After that you can install all the packages on "d-apt".


To install dmd compiler, dmd doc, gtkd devel and gtkd doc packages just run the 
next line:

$ sudo apt-get install dmd-compiler dmd-doc libgtkd3-dev libgtkd3-doc


Then you can compile/run a GtkD example contained on gtkd doc archive. To do 
that just run the next line:

$ dmd `pkg-config --cflags --libs gtkd-3` -run 
/usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow


To run the compiled example just type:

$ ./TestWindow


There are more examples at /usr/share/libgtkd3-doc/demos/


Hope this help you.

Jordi


Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-17 Thread Jordi Sayol via Digitalmars-d-learn
El 17/02/18 a les 18:49, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> But the installation via apt-get is not working without the steps already 
> mentioned in the post before! (s/http/https/  and manually import of the 
> public key)

"d-apt.list" file fixed! (s/http/https/)

d-apt public key is in the "d-apt-keyring" deb package, so you don't have to 
manually install it.

> 
> This (from https://dlang.org/download.html) is outdated for 17.10.
> 
> sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
> /etc/apt/sources.list.d/d-apt.list
> sudo apt-get update && sudo apt-get -y --allow-unauthenticated install 
> --reinstall d-apt-keyring
> sudo apt-get update && sudo apt-get install dmd-compiler dub

It appears that everything should work on 17.10 now. I'll do more tests on a 
virtual machine.




Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-13 Thread Jordi Sayol via Digitalmars-d-learn
El 13/02/18 a les 08:03, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> On Monday, 12 February 2018 at 21:18:01 UTC, Jordi Sayol wrote:
>> El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha 
>> escrit:
>>> I just started to play around with D again on my notebook at home and 
>>> realized,
>>> that I have a broken installation.
>>> Even the minimal D "hello world" throws an error at execution.
>>> Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
>>>
>>> Compiling with ldc2 still works.
>>> Any hint?
>>>
>>>
>>>
>>
>> d-apt <http://d-apt.sourceforge.net/>
> 
> After setting ulimit -c unlimited to get the core dumped, I took a look with 
> gdb,
> to find a hint, now realizing, that it is probably the same problem as here:
> https://forum.dlang.org/thread/jjaynewwdsyntyehv...@forum.dlang.org?page=1
> 

A fresh install from d-apt on Ubuntu 16.04 32-bit, and everything worked fine.

test.d

import std.stdio;

void main()
{
writeln("Hello world!");
}


$ rdmd test.d 
Hello world!

$ dmd -run test.d 
Hello world!



Re: dmd-2.078.2 problems with Ubuntu 17.10 32Bit

2018-02-12 Thread Jordi Sayol via Digitalmars-d-learn
El 12/02/18 a les 21:56, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> I just started to play around with D again on my notebook at home and 
> realized,
> that I have a broken installation.
> Even the minimal D "hello world" throws an error at execution.
> Speicherzugriffsfehler (Speicherabzug geschrieben) aka. core dump
> 
> Compiling with ldc2 still works.
> Any hint?
> 
> 
> 

d-apt 


Re: D, GTK, Qt, wx,…

2016-05-29 Thread Jordi Sayol via Digitalmars-d-learn
El 29/05/16 a les 13:03, Russel Winder via Digitalmars-d-learn ha escrit:
> GKT+ has a reputation for being dreadful on OSX and even worse on
> Windows. Qt on the other hand has a reputation for being the most
> portable – though clearly wx is (arguable) the most portable.
> 
> We have GtkD which is brilliant, especially as it has GStreamer
> support.
> 
> From what I can tell QtD is in need of effort or restarting.
> 
> Is there even a wxD?
> 
> Or perhaps there is an alternative that fits the bill of being
> production ready now, and either gives the same UI across all platforms
> or provides a platform UI with no change of source code, just a
> recompilation.
> 

https://github.com/nomad-software/tkd




Re: Let dmd or ldc be easy to setup on Ubuntu

2015-12-22 Thread Jordi Sayol via Digitalmars-d-learn
El 22/12/15 a les 18:28, Jordi Sayol via Digitalmars-d-learn ha escrit:
> "d-lang" splits it in few deb packages:

s/d-lang/d-apt/


Re: Let dmd or ldc be easy to setup on Ubuntu

2015-12-22 Thread Jordi Sayol via Digitalmars-d-learn
El 22/12/15 a les 16:38, FrankLike via Digitalmars-d-learn ha escrit:
> sudo apt-get install dmd ← it's error.

dmd_2.069.2-0-amd64.deb from http://downloads.dlang.org/ is an all-in-one deb 
package, containing all the tools and libraries for each release.

"d-lang" splits it in few deb packages:

dmd-bin (compiler and other executable files)
dmd-doc (documentation, man pages and examples)
libphobos2-69 (shared library)
libphobos2-dev (static library, symlink to shared library, module sources 
and pkg-config files)

So if you want to install dmd compiler, just type:
$ sudo apt-get install dmd-bin

Regards,
Jordi





Re: Hello World Example with Glade?

2015-09-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/09/15 a les 09:13, Mike McKee via Digitalmars-d-learn ha escrit:
> On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
>> There's a Glade example in the demos/builder directory...
> 
> I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt steps 
> from here:
> 
> http://d-apt.sourceforge.net/
> 
> $ sudo su
> # wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
> /etc/apt/sources.list.d/d-apt.list
> # apt-get update && apt-get -y --allow-unauthenticated install --reinstall 
> d-apt-keyring && apt-get update
> # apt-get install libgtkd3-dev libgtkd3-doc
> 
> I then run the following and it fails:
> 
> # dmd test1.d
> test1.d(1): Error: module gtk is in file 'gtk.d' which cannot be read
> import path[0] = /usr/include/dmd/phobos
> import path[1] = /usr/include/dmd/druntime/import
> 


On  there is the "pkg-config" section:

---
pkg-config:
Every dev package contains "pkg-config" (shared and static) configuration 
files for the specific library.
i.e. link GtkD2 applications against "libgtkd2.so" and "libphobos2.so" 
shared libraries:
$ dmd `pkg-config --cflags --libs gtkd2` my_gtkd2_app.d
or link GtkD2 applications against "libgtkd2.a" and "libphobos2.a" static 
libraries:
$ dmd `pkg-config --cflags --libs gtkd2-static` my_gtkd2_app.d
---

Best regards


Re: Hello World Example with Glade?

2015-09-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/09/15 a les 11:05, Jordi Sayol via Digitalmars-d-learn ha escrit:
> El 11/09/15 a les 09:13, Mike McKee via Digitalmars-d-learn ha escrit:
>> On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
>>> There's a Glade example in the demos/builder directory...
>>
>> I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt 
>> steps from here:
>>
>> http://d-apt.sourceforge.net/
>>
>> $ sudo su
>> # wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
>> /etc/apt/sources.list.d/d-apt.list
>> # apt-get update && apt-get -y --allow-unauthenticated install --reinstall 
>> d-apt-keyring && apt-get update
>> # apt-get install libgtkd3-dev libgtkd3-doc
>>
>> I then run the following and it fails:
>>
>> # dmd test1.d
>> test1.d(1): Error: module gtk is in file 'gtk.d' which cannot be read
>> import path[0] = /usr/include/dmd/phobos
>> import path[1] = /usr/include/dmd/druntime/import
>>
> 
> 
> On <http://d-apt.sourceforge.net/> there is the "pkg-config" section:
> 
> ---
> pkg-config:
> Every dev package contains "pkg-config" (shared and static) configuration 
> files for the specific library.
> i.e. link GtkD2 applications against "libgtkd2.so" and "libphobos2.so" 
> shared libraries:
> $ dmd `pkg-config --cflags --libs gtkd2` my_gtkd2_app.d
> or link GtkD2 applications against "libgtkd2.a" and "libphobos2.a" static 
> libraries:
> $ dmd `pkg-config --cflags --libs gtkd2-static` my_gtkd2_app.d
> ---

Just replace "gtkd2" by "gtkd3"

$ dmd `pkg-config --cflags --libs gtkd3` my_glade_app.d
$ dmd `pkg-config --cflags --libs gtkd3-static` my_glade_app.d

This works out of the box with the "builderTest.d" example on GtkD demos folder.

Regards


Re: tkd - basic compilation problem

2015-07-01 Thread Jordi Sayol via Digitalmars-d-learn


El 30/06/15 a les 16:28, Paul via Digitalmars-d-learn ha escrit:
 Using dub I get this during linking:

 Building tkd-test ~master configuration application, build type debug.
 Compiling using dmd...
 Linking...
 /usr/bin/ld: cannot find -ltcl
 /usr/bin/ld: cannot find -ltk

 ...any suggestions please?


If you are in Debian, Ubuntu, Linuxmint, etc, you can use the d-apt repository:

http://d-apt.sourceforge.net/

There are deb packages for tkd:

$ sudo apt-get install libtkd-dev libtkd-doc

You can compile the example application included on libtkd-doc deb package to 
test if tkd is properly installed on your system:

For shared linking against libphobos2.so and libtkd.so:
$ dmd `pkg-config --cflags --libs tkd` -J/usr/share/libtkd-doc/example/media/ 
/usr/share/libtkd-doc/example/example.d

For static linking against libphobos2.a and libtkd.a:
$ dmd `pkg-config --cflags --libs tkd-static` 
-J/usr/share/libtkd-doc/example/media/ /usr/share/libtkd-doc/example/example.d

Best regards,
Jordi




Re: Can't install dub on Debian

2014-11-13 Thread Jordi Sayol via Digitalmars-d-learn
El 13/11/14 a les 07:29, Suliman via Digitalmars-d-learn ha escrit:
...
 Description:Debian GNU/Linux 6.0.9 (squeeze)
...

packages on d-apt repository are created for multiarch systems, Debian 7.x.x 
and Ubuntu 12.04. Old stable Debian 6.x.x is not.

If you want to install dub deb package from d-apt on Debian 6.x.x I recomend 
you to install first the all-in-one dmd deb package from dlang.org: 
http://downloads.dlang.org/releases/2014/dmd_2.066.1-0_amd64.deb
then try to install dub deb package again. You can download it from here: 
http://sourceforge.net/projects/d-apt/files/pool/main/d/dub/dub_0.9.22-0_amd64.deb/download

I cannot assure that you will be able to install this dub deb package because 
it is designed for multi-arch systems.

Regards,
-- 
Jordi Sayol


Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/05/14 07:34, Moses via Digitalmars-d-learn ha escrit:
 On Sunday, 11 May 2014 at 04:33:24 UTC, Ali Çehreli wrote:
 On 05/10/2014 07:12 PM, Moses wrote:
 After using the 1-click Ubuntu installer, I'm having trouble figuring
 out how to import standard library functions for Phobos. I get the message:

 Error: module io is in file 'std/std/io.d' which cannot be read

 Judging from the repeated stds up there I think you put a dot before io:

 import std.std.io;  // -- WRONG

 The second dot should not be there. Do this instead:

 import std.stdio;  // -- correct

 Ali
 
 
 Thanks, I also found that I need to include the flag 
 -I/usr/include/dmd/phobos to get it to compile. I tried doing:
 
 export PATH=$PATH:/usr/include/dmd/phobos
 
 but apparently I still need the -I flag. Is there another way to get around 
 this?
 

PATH environment variable is not related at all with phobos2 sources paths.

All Linux packages (Ubuntu too) includes -I/usr/include/dmd/phobos on 
/etc/dmd.conf configuration file.
If you need to explicit pass this argument to dmd compiler, may be due to 
several reasons.

- You've edited your /etc/dmd.conf file.

- You've created a new dmd.conf on your current directory, on you home 
directory or on dmd command directory (/usr/bin/).

Any dmd.conf file on these places, overrides /etc/dmd.conf

Take a look at:
$ cat /etc/dmd.conf

Regard,
-- 
Jordi Sayol




Re: Installing 32 bit libcurl.so.4 on Ubuntu

2014-04-09 Thread Jordi Sayol
El 09/04/14 05:31, Walter Bright ha escrit:
 Anyone know how?
 
 sudo apt-get install curl
 
 doesn't do it.
 

curl runtime library:

sudo apt-get install libcurl3


curl development library:

sudo apt-get install libcurl4-openssl-dev


Regards,
-- 
Jordi Sayol


Re: Installing 32 bit libcurl.so.4 on Ubuntu

2014-04-09 Thread Jordi Sayol
El 09/04/14 05:31, Walter Bright ha escrit:
 Anyone know how?
 
 sudo apt-get install curl
 
 doesn't do it.
 

curl runtime library:

sudo apt-get install libcurl3


curl development library:

sudo apt-get install libcurl4-openssl-dev


32-bit libcurl4-openssl-dev on 64-bit system:

sudo apt-get install libcurl3:i386


libcurl4-openssl-dev 32-bit is not installable on 64-bit system due to 
dependencies.


Regards,
-- 
Jordi Sayol


Re: Installing 32 bit libcurl.so.4 on Ubuntu

2014-04-09 Thread Jordi Sayol
El 09/04/14 09:46, Jordi Sayol ha escrit:
[...]
 32-bit libcurl4-openssl-dev on 64-bit system:
 
   sudo apt-get install libcurl3:i386
[...]

typo, it should be:

32-bit libcurl3 library on 64-bit system:

sudo apt-get install libcurl3:i386

-- 
Jordi Sayol


Re: GtkD - how to install

2013-12-22 Thread Jordi Sayol
El 22/12/13 14:29, Amateur ha escrit:
 Hello,
 
 I'm beginning with programming on desktop. After choosing which
 language is da best for me, I chose D. And now I want to create
 GUI applications, so I tried installing GtkD and I failed. Can
 anybody give me a short manual?
 
 I'd like to code on linux (openSUSE 13.1), but if I'll get help
 on Windows, I'll be happy too.
 
 Thank you
 

There is http://d-apt.sourceforge.net/ for Debian Linux.

-- 
Jordi Sayol


Re: migrating to 64 bit

2013-12-16 Thread Jordi Sayol
El 16/12/13 22:13, Stephen Jones ha escrit:
 Thanks for your answers but I wasn't quite clear about what I asking. 
 Basically I am on a 64 bit os but I want to continue compiling for a 32 bit 
 os. I don't want to reconfigure Derelict because I already have all the 
 functionality I need from Derelict. Until dmd on Windows 64 bit is sorted 
 out, including a clear procedure for setting up the linker I have no need or 
 wish to compile for 64 bit. Especially since any d program that compiles on 
 32 bit will compile under 64 bit.
 
 Is there a flag on dmd that forces it to assume it is creating 32 bit object 
 files? Or is this not possible?
 

AFAIK, 32-bit dmd will always compile to 32-bit by default, so -m32 flag is 
not needed even if compiling on 64-bit windows. To compile to 64-bit use -m64.

-- 
Jordi Sayol


Re: How to install dmd2 in centos 5.3 x64

2013-12-03 Thread Jordi Sayol
El 03/12/13 11:43, Puming ha escrit:
 Hi:
 
 I followed the steps in http://dlang.org/dmd-linux.html, but when I build a 
 simple hello world program with:
 
 rdmd hello.d
 
 I get the following error:
 
 rdmd hello.d
 /usr/bin/ld: cannot find -l:libphobos2.a
 
 I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't 
 find it.
 

$ rdmd -L-L/usr/lib64 a.d

You can permanently add this to dmd command-line by creating dmd.conf file: 
http://dlang.org/dmd-linux.html#dmd_conf

 Now I really wish all our servers are using ubuntu server..
 
 Could anybody shed some light on where the problem is? I don't have much 
 experience in linux except using apt-get in ubuntu.

On Debian based systems, like Ubuntu, you can use d-apt repository: 
http://d-apt.sourceforge.net/

 
 Thanks.
 
 Puming.
 

-- 
Jordi Sayol


Re: How to install dmd2 in centos 5.3 x64

2013-12-03 Thread Jordi Sayol
El 03/12/13 14:10, Puming ha escrit:
 On Tuesday, 3 December 2013 at 11:17:27 UTC, Jordi Sayol wrote:
 El 03/12/13 11:43, Puming ha escrit:
 Hi:

 I followed the steps in http://dlang.org/dmd-linux.html, but when I build a 
 simple hello world program with:

 rdmd hello.d

 I get the following error:

 rdmd hello.d
 /usr/bin/ld: cannot find -l:libphobos2.a

 I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still 
 can't find it.


 $ rdmd -L-L/usr/lib64 a.d

 
 still get the same error.

Is libphobos2.a the same arch than the program you're building?

 
 You can permanently add this to dmd command-line by creating
 
 I was using the default dmd.conf in the .zip package
 
 
 dmd.conf file: http://dlang.org/dmd-linux.html#dmd_conf

 Now I really wish all our servers are using ubuntu server..

 Could anybody shed some light on where the problem is? I don't have much 
 experience in linux except using apt-get in ubuntu.

 On Debian based systems, like Ubuntu, you can use d-apt repository: 
 http://d-apt.sourceforge.net/
 
 Yes, I was using that at home.
 


 Thanks.

 Puming.
 
 

-- 
Jordi Sayol


Re: shared phobos 2.064, ubuntu 12.04

2013-11-29 Thread Jordi Sayol
El 29/11/13 07:55, Alexandr Druzhinin ha escrit:
 I recompile old project with dmd 2.064 and get the runtime error:
 Fatal Error while loading '/usr/lib/x86_64-linux-gnu/libphobos2.so.0.64':
 The module 'std.path' is already defined in 
 'bin64/workstation-x86-sdl_64'.
 How can I avoid this `collision`?
 

This is a known issue: https://d.puremagic.com/issues/show_bug.cgi?id=11543

The only workaround I know is to link against static phobos library.

-- 
Jordi Sayol


Re: D scientific graphics

2013-11-23 Thread Jordi Sayol
El 22/11/13 17:14, Jordi Sayol ha escrit:
 El 22/11/13 16:55, seany ha escrit:
 Hello,

 is there a D pacakge for scientific graphing, a la pyvis 
 (http://pyvis.sourceforge.net/) for python?

 I took a look at the wiki page: 
 http://wiki.dlang.org/Libraries_and_Frameworks This page is not answering my 
 question.

 thank you

 
 There's a David Simcha project:
 
 https://github.com/dsimcha/Plot2kill/wiki/Overview
 
 Unfortunately it is not developed for about one year and don't properly 
 compile with the current dmd release.
 

Here you have some example pictures showing what Plot2Kill is capable to do:

http://postimg.org/gallery/7gvoyz6e/6f604b4e/

I've created new Plot2kill deb packages 
https://github.com/dsimcha/Plot2kill/wiki/Overview, available at d-apt 
http://d-apt.sourceforge.net/.

To see a Plot2kill demonstration:

$ sudo apt-get install libplot2kill-dev libplot2kill-doc 

$ dmd `pkg-config --cflags --libs plot2kill-static` -run 
/usr/share/libplot2kill-doc/examples/demo.d

Note: This demo will create some picture files on current directory.

Shared library cannot be yet used due to this bug: 
https://d.puremagic.com/issues/show_bug.cgi?id=11543.

-- 
Jordi Sayol


Re: D scientific graphics

2013-11-22 Thread Jordi Sayol
El 22/11/13 16:55, seany ha escrit:
 Hello,
 
 is there a D pacakge for scientific graphing, a la pyvis 
 (http://pyvis.sourceforge.net/) for python?
 
 I took a look at the wiki page: 
 http://wiki.dlang.org/Libraries_and_Frameworks This page is not answering my 
 question.
 
 thank you
 

There's a David Simcha project:

https://github.com/dsimcha/Plot2kill/wiki/Overview

Unfortunately it is not developed for about one year and don't properly compile 
with the current dmd release.

-- 
Jordi Sayol


Re: curl linux

2013-09-28 Thread Jordi Sayol
On 28/09/13 10:28, Alexandr Druzhinin wrote:
 I use curl in my application. If I link it with -lcurl - symbols are 
 undefined (libcurl3 installed), if I link with -lphobos2 - it links. So curl 
 is linked with libphobos2.so? But what to do if I need static linking? 
 (ubuntu 12.04 x86_64, dmd 2.063.2)
 

To link against libcurl (-lcurl) you need to install libcurl development files. 
On Ubuntu, install one of these three packages: libcurl4-openssl-dev, 
libcurl4-gnutls-dev or libcurl4-nss-dev.

For libcurl static linking you should link against all libraries that libcurl 
depends on.

-- 
Jordi Sayol


Re: curl linux

2013-09-28 Thread Jordi Sayol
On 28/09/13 14:41, Alexandr Druzhinin wrote:
 28.09.2013 17:06, Jordi Sayol пишет:
 On 28/09/13 10:28, Alexandr Druzhinin wrote:
 I use curl in my application. If I link it with -lcurl - symbols are 
 undefined (libcurl3 installed), if I link with -lphobos2 - it links. So 
 curl is linked with libphobos2.so? But what to do if I need static linking? 
 (ubuntu 12.04 x86_64, dmd 2.063.2)


 To link against libcurl (-lcurl) you need to install libcurl development 
 files. On Ubuntu, install one of these three packages: 
 libcurl4-openssl-dev, libcurl4-gnutls-dev or libcurl4-nss-dev.

 For libcurl static linking you should link against all libraries that 
 libcurl depends on.

 Thank you for info. I have installed libcurl4-gnutls-dev - the same 
 happens, symbols are undefined. But with -lphobos2 it links... Why linker 
 don't find these symbols if libs are installed? Should I pass to linker some 
 additional info in this case?
 

Can I see your full command line please?
$ dmd -lcurl 

-- 
Jordi Sayol



Re: How compile program with curl support?

2013-08-22 Thread Jordi Sayol
On 22/08/13 15:20, evilrat wrote:
 On Thursday, 22 August 2013 at 13:15:39 UTC, ilya-stromberg wrote:
 On Thursday, 22 August 2013 at 10:24:49 UTC, David wrote:
 What should I do to get curl support?
 OS is Linux Ubuntu 12.10.

 Install libcurl-dev
 http://packages.ubuntu.com/de/lucid/libcurl-dev

 Add -L-lcurl to your commandline

 Thanks for help. Correct answer was here:
 http://forum.dlang.org/post/mailman.1089.1350735488.5162.digitalmar...@puremagic.com

 $ dmd -L-lphobos2 -L-lcurl main.d

 As I can see by google, this is common issue. How can we document the 
 compilation proses?
 
 why do u link phobos when compiler do this for you?

On static linking, the library order cares. libphobos2 depends on libcurl, 
so libphobos2 should be passed to the linker before than libcurl.

 
 btw in fact i've seen somewhere on site/wiki/forums instructions how to 
 build libcurl for D or something.
 

-- 
Jordi Sayol


Re: [GtkD] linux shared library names

2013-08-07 Thread Jordi Sayol
On 07/08/13 20:44, Druzhinin Alexandr wrote:
 I built a linux app using GtkD, but when I run it it complains about it 
 cannot find libgtkglext-3.0.so.0 and libgdkglext-3.0.so.0. My box (ubuntu 
 12.04 TLS) has gtkglext libs installed already but the libs has different 
 names - libgtkglext-x11-1.0.so.0 and libgdkglext-x11-1.0.so.0.
 I did soft links to these libs then application started running and just 
 crushed anyway.
 Are names of libs used by GtkD correct? I google these names and find them in 
 GtkD repository only. Nowhere else.
 

Edit GtkD sources file:
src/gtkc/paths.d:127,128

Compile GtkD libraries and recompile your project.

Regards,
-- 
Jordi Sayol


Re: std.net.curl is not working?

2013-04-26 Thread Jordi Sayol
On 26/04/13 19:55, mab wrote:
 Thank you for answering. But it didnt work.
 
 I get:
 #dmd hello.d -L-lcurl
 /usr/bin/ld: cannot find -lcurl
 collect2: ld returned 1 exit status
 --- errorlevel 1
 
 Curl is installed, as also libcurl3.

You need to install the development curl package:

$ sudo apt-get install libcurl4-openssl-dev
or
$ sudo apt-get install libcurl4-gnutls-dev
or
$ sudo apt-get install libcurl4-nss-dev

 
 I forget to mention that i am using DMD64 D Compiler v2.062.
 Is std.net.curl working in this Version? Because it also didnt work on my 
 Windows 7 System.
 

-- 
Jordi Sayol


Re: gtkD problem

2013-04-04 Thread Jordi Sayol
On 04/04/13 15:57, Steve wrote:
 A similar problem. I've installed the latest GtkD package, and downloaded and 
 run the Gtk+3 installer.  I've modified the sc.ini file to reference the 
 include area and the newly built GtkD.lib file.  I'm using dmd 2.062 under 
 Windows XP.  The Gtk bin area is in my path, and the dlls can be found.  I'm 
 compiling for 32-bit. I built the GtkD.lib file using the supplied GtkD.brf 
 file and bud.  When I run any of the example files (which all successfully 
 build), I get:
 
 The procedure entry point g_mutex_lock could not be located in the dynamic 
 link librarylibglib-2.0.0-dll.
 
 I'm only having difficulties on Windows.  It works just fine on Linux.
 

No problem on wine (windows api for Linux), installed dmd 2.062, Gtk+3 runtime 
32-bit https://code.google.com/p/gtkd-packages/downloads/list , compiled gtkd 
using the wiki procedure: 
https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows

C:\testdir dmd test.d -IC:\path\to\gtkd\source\dir -L C:\path\to\GtkD.lib 
-L/SUBSYSTEM:WINDOWS

It worked fine.

Regards,
-- 
Jordi Sayol


Re: gtkD problem

2013-01-28 Thread Jordi Sayol
Al 28/01/13 13:43, En/na SaltySugar ha escrit:
 I have one problem. I compiled gtkD ad my first program successfully but when 
 I try to run my program it shows:
 
 C:\appshello
 object.Exception@..\src\gtkc\Loader.d(123): Library load failed: 
 libgtk-3-0.dll
 
 My Path variable:
 C:\Program Files\PC Connectivity 
 Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program 
 Files\ATI Technologies\ATI.ACE;C:\D\dmd2\windows\bin;C:\D\dm\bin;C:\Documents 
 and Settings\Tomas\Application 
 Data\Dashlane\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Program
  Files\GTK3\bin
 
 GTK_BASEPATH variable:
 
 C:\Program Files\GTK3\bin
 
 can someone help me?
 


Did you install Gtk+ 3 runtime libraries for Windows?

Gtk+3:
http://gtkd-packages.googlecode.com/files/gtk3-runtime_3.6.1_32-bit.exe
http://gtkd-packages.googlecode.com/files/gtk3-runtime_3.6.1_64-bit.exe

Gtk+2:
http://gtkd-packages.googlecode.com/files/gtk2-runtime_2.24.10_32-bit.exe

Regards,
-- 
Jordi Sayol


Re: gtkD problem

2013-01-28 Thread Jordi Sayol
Al 28/01/13 15:08, En/na SaltySugar ha escrit:
 On Monday, 28 January 2013 at 13:20:31 UTC, SaltySugar wrote:
 On Monday, 28 January 2013 at 13:15:09 UTC, Jordi Sayol wrote:
 Al 28/01/13 13:43, En/na SaltySugar ha escrit:
 I have one problem. I compiled gtkD ad my first program successfully but 
 when I try to run my program it shows:

 C:\appshello
 object.Exception@..\src\gtkc\Loader.d(123): Library load failed: 
 libgtk-3-0.dll

 My Path variable:
 C:\Program Files\PC Connectivity 
 Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
  Files\ATI 
 Technologies\ATI.ACE;C:\D\dmd2\windows\bin;C:\D\dm\bin;C:\Documents and 
 Settings\Tomas\Application 
 Data\Dashlane\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Program
  Files\GTK3\bin

 GTK_BASEPATH variable:

 C:\Program Files\GTK3\bin

 can someone help me?



 Did you install Gtk+ 3 runtime libraries for Windows?

 Gtk+3:
 http://gtkd-packages.googlecode.com/files/gtk3-runtime_3.6.1_32-bit.exe
 http://gtkd-packages.googlecode.com/files/gtk3-runtime_3.6.1_64-bit.exe

 Gtk+2:
 http://gtkd-packages.googlecode.com/files/gtk2-runtime_2.24.10_32-bit.exe

 Regards,

 I installed all in one bundle.
 
 I installed GTK+ 3 developer tools and GTK+3 runtime.
 

did you compiled yout hello program to 32-bit or 64-bit? 
did you install Gtk+ 3 32-bit or 64-bit?

can you find libgtk-3-0.dll in your system?

-- 
Jordi Sayol


gtkd shared libraries

2013-01-21 Thread Jordi Sayol
With dmd v2.061, gtkd can be compiled to shared library and linked to them 
directly with dmd command. Only allow compilation to 64-bit. 32-bit return 
Segmentation Fault.

I've built two deb packages containing gtkd shared libs.:
http://d-packages.googlecode.com/files/libgtkd-1-0_1.7.0%7E2013.01.14-0_amd64.deb
http://d-packages.googlecode.com/files/libgtkd-2-0_2.1.0%7E2012.12.03-0_amd64.deb

They depends on static deb gtkd packages at:
https://code.google.com/p/d-apt/wiki/APT_Repository#APT_repository_for_D

This allow you to compile gtkd1 (gtk+2) and gtkd2 (gtk+3).
Tested with all examples at:
http://dsource.org/projects/gtkd/wiki/CodeExamples

to link against shared libraries:
$ dmd `pkg-config --cflags --libs gtkd-2` gtkd_app.d

to link against static libraries:
$ dmd `pkg-config --cflags --libs gtkd-2-static` gtkd_app.d


P.S. This is just for testing.
-- 
Jordi Sayol


How to use a function without their sources

2013-01-18 Thread Jordi Sayol
Is there a way to use a function from a static D library without importing 
their D sources nor their DI interface?
-- 
Jordi Sayol


Re: How to use a function without their sources

2013-01-18 Thread Jordi Sayol
Al 18/01/13 18:47, En/na nazriel ha escrit:
 On Friday, 18 January 2013 at 17:02:51 UTC, Jordi Sayol wrote:
 Is there a way to use a function from a static D library without importing 
 their D sources nor their DI interface?
 
 lib.d:
 
 extern(C) void printf(const char*, ...);
 
 void foo() {
 printf(%s.ptr, hi.ptr);   
 }
 
 test.d:
 
 extern(C) void _D3lib3fooFZv();
 
 void main() {
 _D3lib3fooFZv();
 }
 
 Hehe.
 
 Now, to be honest that is a good question. How to handle name mangling?
 Maybe pragma(mangleOf, ) by Alex Petterson could help.
 

Thanks!

Why it works with extern(C), but not works with extern(D)?

-- 
Jordi Sayol


Is this a bug?

2013-01-15 Thread Jordi Sayol
Hello,

When compiling next code to 64-bit.

app.d

import std.stdio;

void main()
{
ubyte u1 = cast(byte)-1;
byte u2 = cast(short)-1;
uint u3 = cast(int)-1;
int u4 = cast(long)-1;
writefln(%d, u1);
writefln(%d, u2);
writefln(%d, u3);
writefln(%d\n, u4);

writefln(long.sizeof: %d  ulong.max: %20d, ulong.sizeof, ulong.max);
writefln(long.sizeof: %d   long max: %20d, long.sizeof, long.max);
}


Prints this:

255
-1
4294967295
-1

long.sizeof: 8  ulong.max:   4294967295
long.sizeof: 8   long max:  9223372036854775807


ulong.max value is incorrect

Tested with dmd version 2.056, 2.057, 2.058, 2.059, 2.060 and 2.061 

No problem when compiling to 32-bit.

-- 
Jordi Sayol


Re: UTF-8 strings and endianness

2012-10-29 Thread Jordi Sayol
Al 29/10/12 16:17, En/na denizzzka ha escrit:
 Hi!
 
 How to convert D's string to big endian?
 How to convert to D's string from big endian?
 
 

UTF-8 is always big emdian.
-- 
Jordi Sayol


Re: Why doesn't DMD recreate folder structure when using multiple .d files and -H?

2012-10-13 Thread Jordi Sayol
Al 13/10/12 02:10, En/na Andrej Mitrovic ha escrit:
 For example:
 
 $ dmd -H -o- atk/Action.d gio/DBusProxy.d -Hdinclude
 
 Both files are written to the 'include' folder but they're flat
 because the original folder structure is lost. So instead of having:
 
 include/atk/Action.d
 include/gio/DBusProxy.d
 
 I have:
 include/Action.d
 include/DBusProxy.d
 
 The files are completely unusable this way (and this happens
 regardless of -Hd btw).
 I didn't find an open bug report on this, but I think this is worthy
 of an enhancement request.
 

$ dmd -op -H -o- atk/Action.d gio/DBusProxy.d -Hdinclude
-- 
Jordi Sayol


Re: Good D book

2012-10-13 Thread Jordi Sayol
Al 13/10/12 11:29, En/na Jeremy DeHaan ha escrit:
 I've been using D for a few months now, and i love it. It dawned on me that 
 it would be nice to have some books to go over though!
 
 I saw The D Programming Language by Andrei Alexandrescu on Amazon, and I 
 almost bought it when I saw it was written in 2010. I know that D is under 
 development, so would this book still be a viable option?
 
 Are there any other books that someone would recommend?
 
 Thanks much!
 

Ali Çehreli wrote a nice book in Turkish to learn D from scratch, that is 
partially translated to English.

http://ddili.org/ders/d.en/index.html

It's available on-line and as pdf file.

Regards,
-- 
Jordi Sayol



Re: GUI development libraries in D?

2012-09-25 Thread Jordi Sayol
Al 25/09/12 23:52, En/na Matthew Turner ha escrit:
 Hello,
 
 I'm wondering if there is any library for making a GUI with D.  If not, what 
 would you recommend for that?  Could I just use c++ libraries?
 

https://github.com/gtkd-developers/GtkD

-- 
Jordi Sayol


Re: Learning D in Atlanta

2012-08-30 Thread Jordi Sayol
Al 30/08/12 21:32, En/na Paul ha escrit:
 What would be the best way to learn this language?  I live in Atlanta.  I 
 program and script as needed.  Okay, at this point I would classify myself as 
 a hack. But I love writing my own exe utilities.  It's just cool, fun, and 
 powerful.  But I have to do so much struggling to get one little 
 scripting-style D app done.
 
 Are they teaching D in universities?  Any good online clasees that one would 
 recommend?  Should I take a C++ class if I can find one?
 
 I have hacked around in C, Python, and VBA as well.
 
 Regards
 

Ali Çehreli wrote a really nice book in Turkish to learn D from scratch, that 
is partially translated to English.

http://ddili.org/ders/d.en/index.html

It's available on-line and as pdf file.

Regards,
-- 
Jordi Sayol



Re: Looking for D Programming tutorials

2012-08-05 Thread Jordi Sayol
Al 05/08/12 16:03, En/na constantine ha escrit:
 Just finished setting up DMD2 with MonoD IDE, are there any good examples or 
 tutorials to type and learn?
 
 Any recommended material to have look? Thanks.
 

Ali Çehreli wrote a nice book in Turkish to learn D from scratch, that is 
partially translated to English.

http://ddili.org/ders/d.en/index.html

It's available on-line and as pdf file.

Regards,
-- 
Jordi Sayol



Re: Is there a graphing library for D?

2012-07-17 Thread Jordi Sayol
Al 17/07/12 19:53, En/na cal ha escrit:
 On Tuesday, 17 July 2012 at 17:42:49 UTC, dcoder wrote:
 I'm looking for a graphing library for D.  Preferrably, something that uses 
 Qt, but it doesn't have to.  I am plotting sonar data, and I need to plot it 
 'live' so... I need something that is:

 1. simple to use.  I just want to graph x,y data.
 2. ability to scale the display.
 3. displaying more than one curve on the same graph.
 4. Allows for animation of data.  So, suppose I graph curve 1.
Now I tell the library, okay data for curve 1 has been changed,
please refresh graph.  In this manner, I can move an object, and
see the reflection in 'real time'.

Real time in my case would be 10-30ms.
 
 
 There is this, but I have not used it personally:
 https://github.com/dsimcha/Plot2kill

...and there are plot2kill binary deb packages for debian, ubuntu, linuxmint, 
etc. at:
https://code.google.com/p/d-apt/wiki/APT_Repository

-- 
Jordi Sayol




Re: Writing .di files

2012-06-17 Thread Jordi Sayol
Al 17/06/12 16:04, En/na Minas ha escrit:
 Is there a good tutorial about how to write .di files?
 

http://dlang.org/dmd-linux.html#interface_files

-- 
Jordi Sayol


Re: D under Linux Mint

2012-05-23 Thread Jordi Sayol
Al 23/05/12 23:46, En/na snow ha escrit:
 Hello, Ive tried to install D under Linux and followed the steps
 described on . this page http://dlang.org/dmd-linux.html . I
 checked all folders after every step and everything is where it
 should be. In the secound step I did both, adding dmd to the PATH
 and copied the executables into the lib folder. If I type dmd
 into the console, I get back all infos about D, so this is
 already working. But if I try to run a simple Hello world program
 like this:
 
 import std.stdio;
 
 void main() {
 writeln(Hallo Welt);
 }
 
 I get the following error:
 object.d: Error: module object is in file 'object.d' which cannot
 be read
 import path[0] = /usr/local/bin/../../src/phobos
 import path[1] = /usr/local/bin/../../src/druntime/import
 
 
 My DMD folder is in the home directory and the dmd.config
 contains this:
 [Environment]
 
 DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import
 -L-L%@P%/../lib64 -L-L%@P%/../lib32 -L--no-warn-search-mismatch
 -L--export-dynamic
 
 I already tried to compile the program with geany and the
 console. In the console i trid to compile it as: dmd hello.d and
 dmd -c hello.d. But everywhere I get the same errors
 
 
 

In Linux Mint you can install deb packages from http://dlang.org/download.html

32-bit: http://ftp.digitalmars.com/dmd_2.059-0_i386.deb

64-bit: http://ftp.digitalmars.com/dmd_2.059-0_amd64.deb

They work out of the box.

-- 
Jordi Sayol


Re: Errors compiling programs using Derelict 3 under DMD 2

2012-05-12 Thread Jordi Sayol
Al 12/05/12 18:46, En/na Kevin Kowalczyk ha escrit:
 I posted on stackoverflow but there hasn't been much in the way of actually 
 resolving my problem, I'll post the link here in the hopes someone can answer 
 my question.
 
 http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d
 

In Debian, Ubuntu, LinuxMint, etc. you can use Derelict3 deb package from 
https://code.google.com/p/d-apt/wiki/APT_Repository

It includes a pkg-config configuration file:
$ dmd `pkg-config --cflags --libs derelict` my_derelict_app.d

-- 
Jordi Sayol


Re: How to make a directory?

2012-05-01 Thread Jordi Sayol
Al 02/05/12 01:45, En/na Minas ha escrit:
[...]
 Also, is there a way to require the root password of the user when going 
 create the directory in a restricted folder (like /usr) AFTER the application 
 has started?

In Linux, files and directories have the setuid and setgid special flags 
that allow ordinary users to execute binaries with temporary privileges of 
binary file owner or group.

i.e., /usr/bin/passwd (owns root, with setuid) modifies /etc/passwd by any user 
without write permission. /bin/ping (owns root, with setuid) allows any user to 
send and listen control packages throw net interfaces.

-- 
Jordi Sayol


Re: Strange measurements when reproducing issue 5650

2012-04-25 Thread Jordi Sayol
Al 25/04/12 13:27, En/na SomeDude ha escrit:
 On Wednesday, 25 April 2012 at 08:34:40 UTC, SomeDude wrote:
 
 Noone reproduces this ?
 

My results in Linux:

32-bit executable: About 574ms, with or without writeln.

64-bit executable: About 798ms, with or without writeln.

-- 
Jordi Sayol


Re: BigInt Bug or just me?

2012-04-21 Thread Jordi Sayol
Al 21/04/12 16:07, En/na Tyro[17] ha escrit:
 Why does the following implementation of the binomial coefficient yield two 
 different answers?
 

Only happens when compiling to 32-bit.

32-bit:
(40  20) = 137846528820
(40  20) = 68923264410

64-bit:
(40  20) = 137846528820
(40  20) = 137846528820

-- 
Jordi Sayol


Re: BigInt Bug or just me?

2012-04-21 Thread Jordi Sayol
Al 21/04/12 16:42, En/na Tyro[17] ha escrit:
 Actually, in that case it only happens when compiling to 64-bit.
 
 Note: comb1(BigInt(40), BigInt(20))/2; The the BigInt version is
 being divided by two (on MAC OS X) in order to yield the
 correct result.
 

You are right, sorry.

My test was done in a Linux 64-bit.

-- 
Jordi Sayol


Re: Read a unicode character from the terminal

2012-03-31 Thread Jordi Sayol
Many thanks to be so educational.

Best regards,
-- 
Jordi Sayol


Re: Read a unicode character from the terminal

2012-03-31 Thread Jordi Sayol
BTW, for those who do not know, Ali Çehreli is writing a book to learn D from 
scratch. It's very educational.
There are two formats: HTML (on-line) and PDF.
http://ddili.org/ders/d.en/index.html

Best regards,
-- 
Jordi Sayol



Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread Jordi Sayol
Al 27/03/12 11:52, En/na simendsjo ha escrit:
 This might not be the best forum to ask, but as it relates a dmd bug, I hope 
 others here have found a workaround.
 
 I'm using a debian-based x64 distro. Due to 
 http://d.puremagic.com/issues/show_bug.cgi?id=5570, I have to compile for 
 -m32.
 The challenge is installing 32-bit libraries using apt-get. I've found some 
 solutions on the web, but they are all terrible hacks, and I haven't gotten 
 it working properly.
 Downloading packages directly (and all dependencies!) is a real drag!
 
 Has someone found an acceptable way of dealing with this?
 

Hello simendsjo,

All deb packages at http://dlang.org/download.html includes both 32-bit and 
64-bit libraries, so, on a debian-based x64 distro, just install the 64-bit 
deb, and You'll be able to compile to 32-bit just adding -m32 as argument.
Same situation for debian-based x32 distros, You can compile to 64-bit adding 
-m64 as argument. Of course, you'll not allowed to run a 64-bit binary on a x32 
platform.

Best regards,
-- 
Jordi Sayol


Re: Installing x32 packages on x64 debian (or fix a dmd bug)

2012-03-27 Thread Jordi Sayol
Al 27/03/12 12:40, En/na simendsjo ha escrit:
 On Tue, 27 Mar 2012 12:18:45 +0200, Jordi Sayol g.sa...@yahoo.es wrote:
 
 Al 27/03/12 11:52, En/na simendsjo ha escrit:
 This might not be the best forum to ask, but as it relates a dmd bug, I 
 hope others here have found a workaround.

 I'm using a debian-based x64 distro. Due to 
 http://d.puremagic.com/issues/show_bug.cgi?id=5570, I have to compile for 
 -m32.
 The challenge is installing 32-bit libraries using apt-get. I've found some 
 solutions on the web, but they are all terrible hacks, and I haven't 
 gotten it working properly.
 Downloading packages directly (and all dependencies!) is a real drag!

 Has someone found an acceptable way of dealing with this?


 Hello simendsjo,

 All deb packages at http://dlang.org/download.html includes both 32-bit and 
 64-bit libraries, so, on a debian-based x64 distro, just install the 64-bit 
 deb, and You'll be able to compile to 32-bit just adding -m32 as argument.
 Same situation for debian-based x32 distros, You can compile to 64-bit 
 adding -m64 as argument. Of course, you'll not allowed to run a 64-bit 
 binary on a x32 platform.

 Best regards,
 
 Thanks, but I was probably not very clear when writing the question.
 DMD itself is not a problem (rather than the bug which forces me to only use 
 32-bit), it's all the packages available through the package manager - it 
 only downloads 64-bit libraries.

This is not strictly truth. dmd deb packages installs, among others, 
gcc-multilib, witch make possible to compile to 32-bit in x64 platform and 
vice versa .

 If I want to use a c library, I need to find both the library and all it's 
 dependencies as 32-bit libraries rather than just installing through the 
 package manager.
 It can be a tedious process..
 

If you want to run a 32-bit program on a x64, install ia32-libs and all its 
dependencies, through the package manager.

Best regards,
-- 
Jordi Sayol


Re: SONAME and D

2012-02-24 Thread Jordi Sayol
Al 23/02/12 20:29, En/na bioinfornatics ha escrit:
 Le jeudi 23 février 2012 à 19:46 +0100, Mike Wey a écrit :
 On 02/23/2012 05:27 PM, bioinfornatics wrote:
 dear,
 for set soname with:
 - gdc: -Xlinker -soname myLib.so.1
 - ldc2: -soname myLib.so.1
 - dmd: ?

 someone know how set soname with dmd ?


 dmd -L-soname=mylib.so.1

 
 Thanks
 i will do so a $(SONAME_FLAG) in my makefile and maybe i will do a pull
 request for gtkd because ldc do not use -L-soname instead of dmd
 
 

Are you able to build dynamic libraries directly with DMD?
How?
-- 
Jordi Sayol



Re: SONAME and D

2012-02-24 Thread Jordi Sayol
Al 24/02/12 11:59, En/na David ha escrit:

 Are you able to build dynamic libraries directly with DMD?
 How?
 -sharedgenerate shared library
 

I got this:
$ dmd -fPIC -shared foo.d 
/usr/bin/ld: /usr/lib/libphobos2.a(minfo.o): relocation R_X86_64_32 against 
`.data' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libphobos2.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
--- errorlevel 1

-- 
Jordi Sayol


Re: SONAME and D

2012-02-24 Thread Jordi Sayol
Al 24/02/12 11:59, En/na David ha escrit:

 Are you able to build dynamic libraries directly with DMD?
 How?
 -sharedgenerate shared library
 

It compiles to 32-bit but fails for 64-bit, maybe due to compiled libphobos2 
(64-bit) without -fPIC argument?

Another thing.
$ dmd -fPIC -shared foo.d -m32 -offoo.so.0.0.1
generate the incorrect foo.so.0.0.so file name.

but with:
$ dmd -fPIC -shared foo.d -m32 -L-ofoo.so.0.0.1
the correct foo.so.0.0.1 file name is created.

Best regards,
-- 
Jordi Sayol


Re: SONAME and D

2012-02-24 Thread Jordi Sayol
Al 24/02/12 20:21, En/na Ellery Newcomer ha escrit:
 On 02/24/2012 06:27 AM, Jordi Sayol wrote:

 It compiles to 32-bit but fails for 64-bit, maybe due to compiled libphobos2 
 (64-bit) without -fPIC argument?

 
 What? -shared works with 32-bit?
 
 Holy crap, it does! this is awesome!
 
 maybe make a bug report for 64 bit?
 

better wait till libphobos2.a becomes libphobos2.so

-- 
Jordi Sayol


Re: SONAME and D

2012-02-24 Thread Jordi Sayol
Al 24/02/12 20:45, En/na H. S. Teoh ha escrit:
 On Fri, Feb 24, 2012 at 08:36:03PM +0100, Jordi Sayol wrote:
 [...]
 better wait till libphobos2.a becomes libphobos2.so
 [...]
 
 You might have to wait a while for that. AFAIK there are no plans
 currently to make phobos available as a shared library yet.
 
 I personally think that phobos *should* be a shared object at some
 point, but not everyone agrees with me.
 

I think that phobos should be a shared object too, but only when it has some 
sense (by now, every dmd release breaks previous libraries, at least gtkd ones)

Best regards,
-- 
Jordi Sayol


Re: A GUI library to begin with

2012-02-09 Thread Jordi Sayol
Al 09/02/12 21:25, En/na Damian Ziemba ha escrit:
 
 GtkD seems to be the most mature and production ready for D.
 Although indeed, Gtk+ (and then GtkD) suffers from its lack of Native 
 controls.
 
 The best solution would be QtD, but it looks like its abandoned. QtJambi 
 isn't officially supported by Trolltech (Nokia, whatever :D) any more, so 
 switching to Smoke would be the must.
 
 WxD works quite good, you need to keep in mind that it crashes with DMD64, 
 GDC and LDC works fine.
 
 DWT could be nice if it gets 64bitz support and Mac/Cocoa port too.
 
 DFL seems to be Windows only? Tho I guess it isn't maintained anymore.
 
 
 Situation with D and GUI is kinda poor.
 I see hope in Andrej researches about wxPHP and bringing it to D.
 I see hope in reviewing QtD project, it used to be flagship product next to 
 DWT for D.
 DWT could be nice too if 64bt for Windows/Linux and Cocoa will be in.
 
 
 
 As for now, I would use GtkD ;-)
 

There is some other interesting option, but in an early stage:
http://repo.or.cz/w/girtod.git
-- 
Jordi Sayol


Re: gtkD problems and general gui question.

2011-10-18 Thread Jordi Sayol
Al 18/10/11 17:08, En/na Jordi Sayol ha escrit:
 Al 18/10/11 16:44, En/na %u ha escrit:
 Hello.  I downloaded gtkD MS Windows installer, and I tried to
 compile one of the examples shown on the gtkD website:

 http://www.dsource.org/projects/gtkd

 
 There is not GtkD MS Windows installer on gtkd site, You've installed gtk+ 
 runtime.
 
 So, you have to compile and install GtkD yourself on your system.
 
 Take a look at http://dsource.org/forums/viewtopic.php?t=5129
 

If you want GtkD out of the box, there are compiled packages ready for linux on 
gtkd site:
http://www.dsource.org/projects/gtkd/wiki/DebianPackages
http://www.dsource.org/projects/gtkd/wiki/FedoraPackages

Regards,
-- 
Jordi Sayol



smime.p7s
Description: S/MIME Cryptographic Signature