View previous topic :: View next topic |
Author |
Message |
IkeaTheSofa
Joined: 21 Feb 2005 Posts: 6
|
Posted: Wed Feb 23, 2005 5:32 pm Post subject: confused about installing dfl |
|
|
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 |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Wed Feb 23, 2005 10:54 pm Post subject: Re: confused about installing dfl |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Feb 24, 2005 3:23 pm Post subject: Re: confused about installing dfl |
|
|
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 |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Thu Feb 24, 2005 5:34 pm Post subject: Re: confused about installing dfl |
|
|
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.
Vathix wrote: | DFL 0.8 now has dfl.exe to help with this. | Cool! |
|
Back to top |
|
|
IkeaTheSofa
Joined: 21 Feb 2005 Posts: 6
|
Posted: Sat Feb 26, 2005 2:28 pm Post subject: |
|
|
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 |
|
|
IkeaTheSofa
Joined: 21 Feb 2005 Posts: 6
|
Posted: Sat Feb 26, 2005 2:43 pm Post subject: |
|
|
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 |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sat Feb 26, 2005 3:18 pm Post subject: |
|
|
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 |
|
|
IkeaTheSofa
Joined: 21 Feb 2005 Posts: 6
|
Posted: Sun Feb 27, 2005 5:54 pm Post subject: |
|
|
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
Thanks again. |
|
Back to top |
|
|
|