Re: GtkD - how to install

2013-12-23 Thread Alexandr Druzhinin

23.12.2013 23:50, DLang Beginner пишет:

On Monday, 23 December 2013 at 16:20:24 UTC, Alexandr Druzhinin wrote:

23.12.2013 22:52, DLang Beginner пишет:
Either build this libraries like me or try to change dependency in
package.json:
"gtk-d": "~master" => "gtk-d:gtkd": "~master"
You get error because your app try to use opengl extention for gtk,
but this extension isn't provided by default for gtk3. I solved this
problem for me, but I spent much time and frankly can't remember my
steps. But if you don't need opengl you can use only subpackage of
gtkd as I write above.


OH YES! No, I don't need OpenGL, so I changed dependency and it works
fine! Thank you so much!

I <3 D and it's community. :)

You're welcome!


Re: GtkD - how to install

2013-12-23 Thread DLang Beginner
On Monday, 23 December 2013 at 16:20:24 UTC, Alexandr Druzhinin 
wrote:

23.12.2013 22:52, DLang Beginner пишет:
On Monday, 23 December 2013 at 13:50:29 UTC, Alexandr 
Druzhinin wrote:
You shouldn't create your app inside gtkd structure. Try the 
following:

cd
mkdir test
cd test
dub init
copy ~/Desktop/gtkd/source/app.d ./source/
copy ~/Desktop/gtkd/package.json .
dub

and show what will happen


Yeah, that worked! Application successfully compiled. But when 
I try
start it, I'm getting another error because I don't have 
libgdkglext-3.0

library.

object.Exception@../../.dub/packages/gtk-d-master/src/gtkc/Loader.d(127): 
Library

load failed: libgdkglext-3.0.so.0
Either build this libraries like me or try to change dependency 
in package.json:

"gtk-d": "~master" => "gtk-d:gtkd": "~master"
You get error because your app try to use opengl extention for 
gtk, but this extension isn't provided by default for gtk3. I 
solved this problem for me, but I spent much time and frankly 
can't remember my steps. But if you don't need opengl you can 
use only subpackage of gtkd as I write above.


OH YES! No, I don't need OpenGL, so I changed dependency and it 
works fine! Thank you so much!


I <3 D and it's community. :)


Re: GtkD - how to install

2013-12-23 Thread DLang Beginner
On Monday, 23 December 2013 at 13:50:29 UTC, Alexandr Druzhinin 
wrote:

23.12.2013 19:19, DLang Beginner пишет:
On Monday, 23 December 2013 at 10:08:09 UTC, Alexandr 
Druzhinin wrote:

Show your package.json file and the project structure.


https://www.dropbox.com/s/l3wwm84w85h5su2/dlang-gtk1.png
https://www.dropbox.com/s/9vs4r9l3lvdw2y1/dlang-gtk2.png
You shouldn't create your app inside gtkd structure. Try the 
following:

cd
mkdir test
cd test
dub init
copy ~/Desktop/gtkd/source/app.d ./source/
copy ~/Desktop/gtkd/package.json .
dub

and show what will happen


Yeah, that worked! Application successfully compiled. But when I 
try start it, I'm getting another error because I don't have 
libgdkglext-3.0 library.


object.Exception@../../.dub/packages/gtk-d-master/src/gtkc/Loader.d(127): 
Library load failed: libgdkglext-3.0.so.0


Re: GtkD - how to install

2013-12-23 Thread Alexandr Druzhinin

23.12.2013 22:52, DLang Beginner пишет:

On Monday, 23 December 2013 at 13:50:29 UTC, Alexandr Druzhinin wrote:

You shouldn't create your app inside gtkd structure. Try the following:
cd
mkdir test
cd test
dub init
copy ~/Desktop/gtkd/source/app.d ./source/
copy ~/Desktop/gtkd/package.json .
dub

and show what will happen


Yeah, that worked! Application successfully compiled. But when I try
start it, I'm getting another error because I don't have libgdkglext-3.0
library.

object.Exception@../../.dub/packages/gtk-d-master/src/gtkc/Loader.d(127): 
Library
load failed: libgdkglext-3.0.so.0
Either build this libraries like me or try to change dependency in 
package.json:

"gtk-d": "~master" => "gtk-d:gtkd": "~master"
You get error because your app try to use opengl extention for gtk, but 
this extension isn't provided by default for gtk3. I solved this problem 
for me, but I spent much time and frankly can't remember my steps. But 
if you don't need opengl you can use only subpackage of gtkd as I write 
above.


Re: GtkD - how to install

2013-12-23 Thread Alexandr Druzhinin

23.12.2013 19:19, DLang Beginner пишет:

On Monday, 23 December 2013 at 10:08:09 UTC, Alexandr Druzhinin wrote:

Show your package.json file and the project structure.


https://www.dropbox.com/s/l3wwm84w85h5su2/dlang-gtk1.png
https://www.dropbox.com/s/9vs4r9l3lvdw2y1/dlang-gtk2.png

You shouldn't create your app inside gtkd structure. Try the following:
cd
mkdir test
cd test
dub init
copy ~/Desktop/gtkd/source/app.d ./source/
copy ~/Desktop/gtkd/package.json .
dub

and show what will happen


Re: GtkD - how to install

2013-12-23 Thread DLang Beginner
On Monday, 23 December 2013 at 10:08:09 UTC, Alexandr Druzhinin 
wrote:

Show your package.json file and the project structure.


https://www.dropbox.com/s/l3wwm84w85h5su2/dlang-gtk1.png
https://www.dropbox.com/s/9vs4r9l3lvdw2y1/dlang-gtk2.png


Re: GtkD - how to install

2013-12-23 Thread Alexandr Druzhinin

Show your package.json file and the project structure.


Re: GtkD - how to install

2013-12-23 Thread DLang Beginner

On Sunday, 22 December 2013 at 14:52:23 UTC, Russel Winder wrote:

On Sun, 2013-12-22 at 13:29 +, Amateur wrote:

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 cloned the Git repository for GtkD and then set up a bash 
script to
give the GtkD make system all the right parameters so I could 
compile it
for DMD, GDC and LDC2. However this is not trivial unless you 
are

familiar with Make.

However I also just tried using Dub and it works very nicely. I 
think

the general opinion will these days be to use Dub.


I'd like to code on linux (openSUSE 13.1), but if I'll get help
on Windows, I'll be happy too.


I only have Debian and Fedora Linux and OS X, I don't do 
Windows ;-)


Hello again. I have successfully installed dub and made GtkD 
dependency. But...


I tried to compile this code:

import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args)
{
Main.init(args);
MainWindow win = new MainWindow("Hello World");
win.setDefaultSize(200, 100);
win.add(new Label("Hello World"));
win.showAll();
Main.run();
}

But compiler said that he won't compile this, because "app.d(1): 
Error: module MainWindow is in file 'gtk/MainWindow.d' which 
cannot be read". Etc. for other imports.


So I copied libraries in /source directory and now compiler 
knows, from where can he import, but compiler is yelling another 
errors.


app.o:(.data+0x10): undefined reference to 
`_D3gtk10MainWindow12__ModuleInfoZ'
app.o:(.data+0x18): undefined reference to 
`_D3gtk5Label12__ModuleInfoZ'
app.o:(.data+0x20): undefined reference to 
`_D3gtk4Main12__ModuleInfoZ'

app.o: In function `_Dmain':
app.d:(.text._Dmain+0x15): undefined reference to 
`_D3gtk4Main4Main4initFKAAyaZv'
app.d:(.text._Dmain+0x1b): undefined reference to 
`_D3gtk10MainWindow10MainWindow7__ClassZ'
app.d:(.text._Dmain+0x3a): undefined reference to 
`_D3gtk10MainWindow10MainWindow6__ctorMFAyaZC3gtk10MainWindow10MainWindow'
app.d:(.text._Dmain+0x5b): undefined reference to 
`_D3gtk5Label5Label7__ClassZ'
app.d:(.text._Dmain+0x85): undefined reference to 
`_D3gtk5Label5Label6__ctorMFAyabZC3gtk5Label5Label'
app.d:(.text._Dmain+0xa9): undefined reference to 
`_D3gtk4Main4Main3runFZv'

collect2: error: ld returned 1 exit status
--- errorlevel 1


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  for Debian Linux.

-- 
Jordi Sayol


Re: GtkD - how to install

2013-12-22 Thread Mike Wey

On 12/22/2013 03:41 PM, Mike Parker wrote:

On 12/22/2013 11:15 PM, Amateur wrote:



What have I to do next?
I have installed Gtk+ libraries, dmd, dub and I ran too commands "dub
init main" and "dub fetch --local gtk-d".


You need to add gtkd as a dependency to your project's package.json:

{
 "dependencies": {
 "gtk-d": "~master"
 }
}

Also, when using dub to manage your project, you don't need to 'fetch'.
As long as a library is listed as a dependency, dub will fetch it
automatically.


I would recommend listing the subpackage as a dependency:

{
"dependencies": {
"gtk-d:gtkd": "~master"
}
}

--
Mike Wey


Re: GtkD - how to install

2013-12-22 Thread Russel Winder
On Sun, 2013-12-22 at 13:29 +, Amateur wrote:
> 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 cloned the Git repository for GtkD and then set up a bash script to
give the GtkD make system all the right parameters so I could compile it
for DMD, GDC and LDC2. However this is not trivial unless you are
familiar with Make.

However I also just tried using Dub and it works very nicely. I think
the general opinion will these days be to use Dub.

> I'd like to code on linux (openSUSE 13.1), but if I'll get help
> on Windows, I'll be happy too.

I only have Debian and Fedora Linux and OS X, I don't do Windows ;-)

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part


Re: GtkD - how to install

2013-12-22 Thread Mike Parker

On 12/22/2013 11:15 PM, Amateur wrote:



What have I to do next?
I have installed Gtk+ libraries, dmd, dub and I ran too commands "dub
init main" and "dub fetch --local gtk-d".


You need to add gtkd as a dependency to your project's package.json:

{   
"dependencies": {
"gtk-d": "~master"
}
}

Also, when using dub to manage your project, you don't need to 'fetch'. 
As long as a library is listed as a dependency, dub will fetch it 
automatically.


Re: GtkD - how to install

2013-12-22 Thread Benjamin Thaut

Am 22.12.2013 15:15, schrieb Amateur:

Yeah, I installed dub and ran commands "dub init main" and "dub fetch
--local gtk-d". It worked properly, but how to continue? I tried compile
simple app which contains only "import gtk.MainWindow;" and compiler
yells that source for this cannot be found.

What have I to do next?
I have installed Gtk+ libraries, dmd, dub and I ran too commands "dub
init main" and "dub fetch --local gtk-d".


You have to create a package.json file for you project and add gtk as a 
dependency.


See this page for further details: http://code.dlang.org/package-format

When you are done setting up the package.json call "dub init" and 
everything should be setup correctly.


Re: GtkD - how to install

2013-12-22 Thread Amateur

On Sunday, 22 December 2013 at 13:38:25 UTC, John Colvin wrote:

On Sunday, 22 December 2013 at 13:29:04 UTC, Amateur wrote:

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


I would recommend using dub. Either download a release from 
http://code.dlang.org/download or clone the github repo 
https://github.com/rejectedsoftware/dub and build with build.sh


then you can list gtkd as a dependency for your project and dub 
will sort it out for you (hopefully).



You will need to install the latest gtk+ libs first with yast 
or zipper or whatever you use for package management.


Yeah, I installed dub and ran commands "dub init main" and "dub 
fetch --local gtk-d". It worked properly, but how to continue? I 
tried compile simple app which contains only "import 
gtk.MainWindow;" and compiler yells that source for this cannot 
be found.


What have I to do next?
I have installed Gtk+ libraries, dmd, dub and I ran too commands 
"dub init main" and "dub fetch --local gtk-d".


Re: GtkD - how to install

2013-12-22 Thread John Colvin

On Sunday, 22 December 2013 at 13:29:04 UTC, Amateur wrote:

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


I would recommend using dub. Either download a release from 
http://code.dlang.org/download or clone the github repo 
https://github.com/rejectedsoftware/dub and build with build.sh


then you can list gtkd as a dependency for your project and dub 
will sort it out for you (hopefully).



You will need to install the latest gtk+ libs first with yast or 
zipper or whatever you use for package management.


GtkD - how to install

2013-12-22 Thread Amateur

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