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

confused about installing dfl

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
IkeaTheSofa



Joined: 21 Feb 2005
Posts: 6

PostPosted: Wed Feb 23, 2005 5:32 pm    Post subject: confused about installing dfl Reply with quote

I apoligize if these are really stupid questions..
I downloaded dfl and am new to D and command line compilers.
I put the dfl.lib in the lib directory in my DMD installation.
I don't understand what you are saying here:
Quote:
Place the dfl directory in one of your import search paths. You may need to edit the DFLAGS in sc.ini (usually found at c:\dmd\bin\sc.ini) to include dfl's parent directory


Linker flags:
You will need to pass special flags to the linker. For a normal Windows application, use:
-L/exet:nt/su:windows:4.0
To include the console window in your application, use this instead:
-L/exet:nt/su:console:4.0
If you fail to pass one of those flags to DMD, parts of DFL will fail to function properly!


I opened the sc.ini and saw the DFLAGS entry but didn't understand what to put in there. Whenever i try to compile hello.d i get:

Quote:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.




C:\D\ext\examples>dmd helloworld.d dfl.lib -L/exet:nt/su:windows:4.0
Error: Error reading file 'object.d'


C:\D\ext\examples>dmd helloworld.d dfl.lib -L/exet:nt/su:windows:4.0
Error: Error reading file 'object.d'


C:\D\ext\examples>dmd helloworld.d
Error: Error reading file 'object.d'


C:\D\ext\examples>dmd helloworld.d
Error: Error reading file 'dfl\all.d'


In the last two examples i was messing with things in the sc.ini file, trying different ways to try your instructions... Thanks for any help.
Back to top
View user's profile Send private message AIM Address
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Wed Feb 23, 2005 10:54 pm    Post subject: Re: confused about installing dfl Reply with quote

IkeaTheSofa wrote:
C:\D\ext\examples>dmd helloworld.d dfl.lib -L/exet:nt/su:windows:4.0
Error: Error reading file 'object.d'
Since object.d is part of Phobos, it looks to me like your problem isn't limited to DFL.

Do you have a line like this in sc.ini?
Code:
DFLAGS="-I?@P?\..\src\phobos"


Is your Phobos source still in the default location ("dmd\src\phobos")?

Also, you probably need to add the DFL import directory to the command line with the -I switch:
Code:
dmd helloworld.d dfl.lib -L/EXET:NT -L/SU:windows -Ic:\D\ext\DFL


I hope this helps.
Back to top
View user's profile Send private message AIM Address
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Feb 24, 2005 3:23 pm    Post subject: Re: confused about installing dfl Reply with quote

jcc7 wrote:
Also, you probably need to add the DFL import directory to the command line with the -I switch:
Code:
dmd helloworld.d dfl.lib -L/EXET:NT -L/SU:windows -Ic:\D\ext\DFL

You can do that or edit sc.ini. They both do the same thing.

DFL 0.8 now has dfl.exe to help with this.
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Thu Feb 24, 2005 5:34 pm    Post subject: Re: confused about installing dfl Reply with quote

Vathix wrote:
jcc7 wrote:
Also, you probably need to add the DFL import directory to the command line with the -I switch:
Code:
dmd helloworld.d dfl.lib -L/EXET:NT -L/SU:windows -Ic:\D\ext\DFL

You can do that or edit sc.ini. They both do the same thing.
That didn't even occur to me, but you're right .

Since I use various libraries located in various locations, I generally don't tell DMD where DFL is until compile time. On the other hand, I have my sc.ini file configured so that DMD already knows where Phobos is.

I guess I need to start using one of those building tools such as build, so that I spend more time writing D and less time writing batch files. Wink

Vathix wrote:
DFL 0.8 now has dfl.exe to help with this.
Cool!
Back to top
View user's profile Send private message AIM Address
IkeaTheSofa



Joined: 21 Feb 2005
Posts: 6

PostPosted: Sat Feb 26, 2005 2:28 pm    Post subject: Reply with quote

Thanks for your help. I downloaded dfl .8 and used the included dfl.exe and now I can get it to work. I saw that you posted .8 the same day i was struggling to make it work, I apoligize for not seeing that and using the newest version. Varthix and Jcc7, I wanted to thank you both for your tutorials. Both of your sites have been the best introduction to D that I have found so far and I wanted to let you know.
Back to top
View user's profile Send private message AIM Address
IkeaTheSofa



Joined: 21 Feb 2005
Posts: 6

PostPosted: Sat Feb 26, 2005 2:43 pm    Post subject: Reply with quote

P.S. I am really perplexed by the sc.ini file and how it works, could someone show me their file with dfl installed?
Back to top
View user's profile Send private message AIM Address
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sat Feb 26, 2005 3:18 pm    Post subject: Reply with quote

IkeaTheSofa wrote:
Thanks for your help. I downloaded dfl .8 and used the included dfl.exe and now I can get it to work. I saw that you posted .8 the same day i was struggling to make it work, I apoligize for not seeing that and using the newest version.

I'm pretty sure you asked before it was released.

Quote:
P.S. I am really perplexed by the sc.ini file and how it works, could someone show me their file with dfl installed?

Here's mine,
Code:
[Version]
version=7.51 Build 020

[Environment]
LIB="?@P?\..\lib";\dm\lib
DFLAGS="-IF:\D\import;?@P?\..\src\phobos"
LINKCMD=?@P?\..\..\dm\bin\link.exe

At F:\D\import I have the dfl folder that contains all the d source files.
- Chris
Back to top
View user's profile Send private message
IkeaTheSofa



Joined: 21 Feb 2005
Posts: 6

PostPosted: Sun Feb 27, 2005 5:54 pm    Post subject: Reply with quote

Thanks Chris.
I set up my sc.ini file like yours (with my directory structure of course) and now I can compile dfl source with

Quote:
dmd helloworld.d dfl.lib -L/exet:nt/su:windows:4.0


Now its on to my project Smile

Thanks again.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL 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