FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Windows] DMD's sc.ini and flags

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Sun Nov 29, 2009 9:48 am    Post subject: [Windows] DMD's sc.ini and flags Reply with quote

Hello.

I've installed DMD, GTK and gtkD on Windows and now am trying to compile cairo clock demo. But using command:
Code:

dmd clock.d main.d


gives me something like this:
Code:

.......

 Error 42: Symbol Undefined _D7gobject7ObjectG7ObjectG16getObjectGStructMFZPS4gt
kc12gobjecttypes7GObject
clock.obj(clock)
 Error 42: Symbol Undefined _D3gtk11DrawingArea11DrawingArea7__ClassZ
clock.obj(clock)
 Error 42: Symbol Undefined _D3gtk4Main4Main4initFAAyaZv
clock.obj(clock)
 Error 42: Symbol Undefined _D3gtk10MainWindow10MainWindow7__ClassZ
clock.obj(clock)
 Error 42: Symbol Undefined _D3gtk10MainWindow10MainWindow6__ctorMFAyaZC3gtk10Ma
inWindow10MainWindow
clock.obj(clock)
 Error 42: Symbol Undefined _D3gtk4Main4Main3runFZv
--- errorlevel 336


The dsss build command just doesn't work - starts, but doesn't finish. I expect I've given wrong flags to DMD. The sc.ini file looks like this:
Code:

[Version]
version=7.51 Build 020

[Environment]
LIB="%@P%\..\lib";"\dm\lib";"C:\Program Files\GTK\lib";"C:\D\gtkD\src"
DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-IC:\D\gtkD\src" "-L-lC:\D\gtkD\src" "-L-lC:\Program Files\GTK\lib" "-L-lC:\Program Files\GTK\bin"
LINKCMD=%@P%\link.exe


DMD is installed in C:\D\DMD\, gtkD in C:\D\gtkD\ and GTK+ int C:\Program Files\GTK\.

How to make it work?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Mon Nov 30, 2009 2:32 pm    Post subject: Reply with quote

If you used DSSS to build the librarym you should use DSSS to build the demo.

Or list all the libs DSSS creates on the commandline.
Back to top
View user's profile Send private message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Tue Dec 01, 2009 8:12 am    Post subject: Reply with quote

Maybye, but tat doesn't work too. It starts, writes "main.d => cairo_clock" and that's all. When I run task manager, I can see rebuild.exe taking more and more memory and nothing happens.

The effect I want to get is that when I have file main.d, where gtkD modules are used, the command:
dmd main.d
results in .exe file. So far the only results are linker errors :/
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Tue Dec 01, 2009 1:29 pm    Post subject: Reply with quote

Quote:
Maybye, but tat doesn't work too. It starts, writes "main.d => cairo_clock" and that's all. When I run task manager, I can see rebuild.exe taking more and more memory and nothing happens.


That usually happens when you haven't yet build and installed the libraries using dsss. ('ddds build' and 'dsss install').

Quote:
The effect I want to get is that when I have file main.d, where gtkD modules are used, the command:
dmd main.d
results in .exe file. So far the only results are linker errors :/


You'll have to list the libraries dmd needs to link with on the commandline, if you've build the libraries it will be a bit impractical since dsss creates a lot of libraries. witch is why that if you've build the library with dsss its better to build the application with dsss. that would be: "dsss build main.d", no config file needed.
If you wand to use dmd directly it better to bild the library an other way so you only have to list one lib on the command line, the scripts for bud should still be in the download, the makefile currently doesn't work on windows.

For building the clock example you'd end up with:
dmd main.d clock.d -L-lgtk (If that's the correct flag on windows.)
if you only want to list the main.d file, use dsss or file a enhancement request for dmd.
Back to top
View user's profile Send private message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Thu Dec 03, 2009 10:42 am    Post subject: Reply with quote

Would you mind placing the link to the script here? I can't find it. It's also not included in the archive...
Back to top
View user's profile Send private message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Sun Dec 06, 2009 2:30 pm    Post subject: Reply with quote

Sorry for double post, but if I edited previous one, it wouldn't be visible from the topic list.

Which files (or files in which folders) should I list on the commandline or DMD config file?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Mon Dec 07, 2009 12:56 pm    Post subject: Reply with quote

Mitu wrote:
Would you mind placing the link to the script here? I can't find it. It's also not included in the archive...


The bud/build scripts?
You can find them in src/build.

Quote:
Which files (or files in which folders) should I list on the commandline or DMD config file?


If you've successfully build the library, this would build the clock demo:

dmd main.d clock.d -Ipath/to/gtkd/source -Lpath/to/gtkd.lib
Back to top
View user's profile Send private message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Tue Dec 08, 2009 8:58 am    Post subject: Reply with quote

OK, I found the script.

In order to make it see all sources, I had to add these lines to gtkD.brf:
Code:

-I../../srcgl
-I../../srcsv
-I../../srcgda


But even after that it doesn't build:
Code:

C:\D\gtkD\src\gtkc\paths.d: Error: module gtkc.paths module and package have the same name
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Tue Dec 08, 2009 3:03 pm    Post subject: Reply with quote

Odd, the module and the package definitely have different names.
Back to top
View user's profile Send private message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Thu Dec 10, 2009 10:03 am    Post subject: Reply with quote

The error is in the file src/build/gtkD.d.

This and one other module is imported with the extension .d.

I've built library and it created single gtkD.lib file, but demo still doesn't link and is giving the same errors...


EDIT:


FINALLY I did it Smile Tank you very much for your help.

Where the problem was? While passing arguments to the compiler, instead of:
Code:
 dmd main.d -LC:/path/to/lib

I have to put
Code:
 dmd main.d -L C:/path/to/lib
with the space between -L and the path.

It's also needed to pass the phobos.lib file in DMD.

Thanks again Smile
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Thu Dec 10, 2009 4:23 pm    Post subject: Reply with quote

I've updated the files for bud/build in svn r734
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group