Setting up dmd/build

Uzair uzair at nairang.org
Sun Oct 29 17:59:11 PST 2006


Hello,

I'm a little unclear on how to set up dmd/bud to build a fairly
simple project. I've downloaded mango, and am using the HttpClient
class to download a webpage.

I'm attaching the sc.ini and build.cfg I'm using. Note that although
these are under my cygwin tree, I am now working purely in cmd.exe,
with the path to dmd/bin at the very front of %PATH%. bud.exe (and
build.cfg) are in dmd/bin, so those are also accessible.

Here's the output from the various things I've tried:

1) Using straight dmd:

C:\cygwin\home\Uzair\dev\rss>dmd rss
rss.d(3): module HttpClient cannot read file
'mango\http\client\HttpClient.d'

2) Using bud:

C:\cygwin\home\Uzair\dev\rss>bud rss
rss.d(3): module HttpClient cannot read file
'mango\http\client\HttpClient.d'

3) Using bud, explicitly trying to specify import and library paths:

C:\cygwin\home\Uzair\dev\rss>bud rss -I..\..\D\include -L..\..\D\lib
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

OPTLINK : Warning 9: Unknown Option : MAP..\..\D\LIB
rss.obj(rss)
 Error 42: Symbol Undefined
__Class_5mango4http6client10HttpClient10HttpClient
rss.obj(rss)
 Error 42: Symbol Undefined
_D5mango4http6client10HttpClient10HttpClient3GetS5ma
ngo4http6client10HttpClient10HttpClient13RequestMethod
rss.obj(rss)
 Error 42: Symbol Undefined
_D5mango4http6client10HttpClient10HttpClient5_ctorFS
5mango4http6client10HttpClient10HttpClient13RequestMethodAaZC5mango4http6client1
0HttpClient10HttpClient
rss.obj(rss)
 Error 42: Symbol Undefined
_D5mango4http6server11HttpHeaders10HttpHeader13Conte
ntLengthS5mango4http6server11HttpHeaders14HttpHeaderName

So, my questions are:
1) What's the best way to clear up the undefined symbol errors? I
thought '-L' to point to the mango.lib file might be the thing to do,
but that obviously didn't work. Also, I'm not clear on why a library
is required at all, since I thought D doesn't have 'header files' and
therefore both declarations and definitions can be 'imported' as
source, ie. from HttpClient.d in this case.
2) My rss.brf (in the same directory as rss.d) has the following in
it, which I thought would be sufficient:
-op
-IC:\cygwin\home\Uzair\D\include\
-IC:\cygwin\home\Uzair\D\dmd\src\phobos\
-IC:\cygwin\home\Uzair\dev\rss\
rss.d
However, as you can see from the output above, that didn't seem to
pass the additional import path (c:\cygwin\home\Uzair\D\include) to
bud.
3) Any suggestions on how best to lay out my project would be
appreciated. I want to leave Mango in a generic place and just
include it as necessary (as I would C++ headers and dll/so's).

Many thanks in advance. I've tried to be as explicit as I could in
describing what I'm doing, I hope it's sufficient (and not
irritating!). Please let me know if there's any additional info I can
provide.

Cheers,

Uzair
begin 644 sc.ini
M6U9E<G-I;VY=#0IV97)S:6]N/3<N-3$@0G5I;&0@,#(P#0H-"EM%;G9I<F]N
M;65N=%T-"DQ)0CTB)4!0)5PN+EQL:6(B#0I$1DQ!1U,](BU))4!0)5PN+EQS
M<F-<<&AO8F]S(@T*3$E.2T--1#U#.EQ<8WEG=VEN7&AO;65<57IA:7)<1%QD
0;5QB:6Y<;&EN:RYE>&4-"@``
`
end
begin 644 build.cfg
M24Y)5#I,:6)0871H<R`]("<B0SI<7&-Y9W=I;EQH;VUE7%5Z86ER7$1<;&EB
M(B<*24Y)5#I"=6EL9$EM<&]R=%!A=&@@/2`G(D,Z7%QC>6=W:6Y<:&]M95Q5
1>F%I<EQ$7&EN8VQU9&4B)PH`
`
end



More information about the Digitalmars-d-learn mailing list