View previous topic :: View next topic |
Author |
Message |
mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Mon Jul 07, 2008 2:46 pm Post subject: installation problem |
|
|
I tried to install gtkD from svn and by the pre-release (9).
"dsss build && sudo dsss install" builds and installs the libs but the source files (e.g. GtkD.d) aren't copied (I've searched /usr/*).
Any idea what could have gone wrong?
When I compile my own program (makefile, also includes /usr/include/d)
Code: | main.d(8): module GtkD cannot read file 'gtk/GtkD.d'
make: *** [main] Error 1 |
|
|
Back to top |
|
|
mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Mon Jul 07, 2008 2:47 pm Post subject: |
|
|
Btw., /usr/local/include/d doesn't exist. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Mon Jul 07, 2008 3:52 pm Post subject: |
|
|
Can you see in the output of dsss installl where it's copying the file to ? |
|
Back to top |
|
|
mwarning
Joined: 01 Apr 2007 Posts: 56
|
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Tue Jul 08, 2008 11:05 am Post subject: |
|
|
I wasn't aware that dsss copied the source files anywhere, merely created the di files and libs and moved them where they need to be.
(sorry, I still use compd...)
Could you not just add the path to the gtkd src files when you compile your program?
Also, gtk/GtkD.d isn't used anymore and will not be included in RC1. |
|
Back to top |
|
|
mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Tue Jul 08, 2008 11:19 am Post subject: |
|
|
Solved.
I included the gtkD source path, removed gtk.GtkD from the imports
and changed stuff like GtkD.init(args); to Main.init(args); to get my app compiled.
I didn't expected this to get changed. (Is it even mentioned somewhere?)
Anyway, DSSS doesn't seem to copy the sources at all. |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Tue Jul 08, 2008 1:57 pm Post subject: |
|
|
Your welcome!
GtkD was renamed to Main in Pre-release 9. This was actually not displayed anywhere except in the code examples. I will update the wiki immediately.
(note: I thought I left GtkD.d in pre9 just for this reason...) |
|
Back to top |
|
|
radon7
Joined: 23 Nov 2009 Posts: 3
|
Posted: Mon Nov 23, 2009 2:17 pm Post subject: compile problems |
|
|
I am using Debian lenny and when I try to compile a program that just makes a window basically I get the following-
window.d:1: module MainWindow cannot read file 'gtk/MainWindow.d'
Is this because I don't have the files in a certain path that gdc uses for source files or is there something I am missing somewhere else. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Mon Nov 23, 2009 2:33 pm Post subject: |
|
|
If you are using DSSS it should take care of the file paths.
When using gdc directly you'll need to tell it where it can find the files. |
|
Back to top |
|
|
radon7
Joined: 23 Nov 2009 Posts: 3
|
Posted: Mon Nov 23, 2009 3:28 pm Post subject: |
|
|
How do I pass the paths to gdc directly. Using the -B option doesn't get me anywhere.
I am using the command gdc -B /path/to/files window.d -o window
creating a dsss.conf file as
name = window
[window.d]
target = window
then running dsss build gives the following output basically the same thing plus some
Default prefix /usr is unwritable, using /home/jaye/d instead.
window.d => window
window.d(1): module MainWindow cannot read file 'gtk/MainWindow.d'
Command /usr/bin/rebuild returned with code 256, aborting.
Error: Command failed, aborting.
I can look at the MainWindow.d file so I know it exists and on my disk. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Tue Nov 24, 2009 3:11 pm Post subject: |
|
|
gdc -Ipath/to/files window.d -o window
Should do it, don't include the gtk directory in the path.
When using DSSS you'll need to build and install (dsss build && dsss install, from the directory that contains: src, srcgl) gtkD with DSSS before you can build gtkD apps with it. |
|
Back to top |
|
|
radon7
Joined: 23 Nov 2009 Posts: 3
|
Posted: Fri Nov 27, 2009 11:05 pm Post subject: ARRRR |
|
|
Thanks Mikey I got that figured out and now I have another problem. Running gdc now that it finds the files I get this output ---
gdc window.d -o window
/tmp/ccCuVTd6.o: In function `_Dmain':
window.d:(.text+0x1b): undefined reference to _D3gtk4Main4Main4initFAAaZv'
window.d:(.text+0x34): undefined reference to _D3gtk10MainWindow10MainWindow7__ClassZ'
window.d:(.text+0x4b): undefined reference to
window.d:(.text+0x92): undefined reference to _D3gtk5Label5Label7__ClassZ'
window.d:(.text+0xa8): undefined reference to _D3gtk5Label5Label5_ctorMFAabZC3gtk5Label5Label'
window.d:(.text+0xd5): undefined reference to _D3gtk4Main4Main3runFZv'
/tmp/ccCuVTd6.o:(.data+0x38): undefined reference to _D3gtk10MainWindow12__ModuleInfoZ'
/tmp/ccCuVTd6.o:(.data+0x3c): undefined reference to _D3gtk5Label12__ModuleInfoZ'
/tmp/ccCuVTd6.o:(.data+0x40): undefined reference to _D3gtk4Main12__ModuleInfoZ'
collect2: ld returned 1 exit status
Am I missing a library that should be installed or is something else going on here. I installed everything I new of from debians repositories. |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Sat Nov 28, 2009 6:47 am Post subject: |
|
|
You'll need to tell the linker to link with the GtkD library and libdl.
gdc -Ipath/to/files window.d -o window -L-ldl -L-lgtkd -L-L/path/to/folder/that/contains/the/gtkd/lib
If you haven't build the gtkd lib yet you can use the makefile that comes with gtkd to do so, just call make from the directory that contains the GNUmakefile. (I'm assuming you are not using DSSS) |
|
Back to top |
|
|
cutecub00 Guest
|
Posted: Fri Jan 29, 2010 6:05 am Post subject: |
|
|
I didn't get this topic..please tell me in detailed manner..thank you |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Fri Jan 29, 2010 2:28 pm Post subject: |
|
|
And i don't get your question, if you could create a new topic with some details about your problem, we might have some more success. |
|
Back to top |
|
|
|