Posted Tue, 19 Jun 2012 08:41:29 +0200 in reply to Don Duvall
Am 18.06.2012 21:12, schrieb Don Duvall:
Hello, I am learning D still and don't understand the toolchain so well
yet, and when I try to switch out the rdmd to a dmd in the run_example
batch script it errors out.
Is it possible to get an example build script that compiles instead of
rdmd automatically finds all .d files that the app.d depends on - dmd
doesn't do this and thus the linking will fail. If you just want to
build without running you can also navigate to the example directory
(e.g. examples/http_server) and then execute "vibe build". You will then
get an app.exe that can be run manually.
Alternatively, building without rdmd just requires to pass all source
files to the compiler. Something like the following should work:
rem find all source files
dir /s /b .d > ../examples/http_server/files.txt<br>cd ../examples/http_server/source<br>dir /s /b .d >> ../files.txt
rem remove some files now by hand...
rem build the example
set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib"
dmd -ofapp.exe -I../../source -Isource -Jviews %LIBS% @files.txt
On Posix systems:
find all source files
find -name .d > ../examples/http_server/files.txt<br>cd ../examples/http_server/source<br>find -name .d >> ../files.txt
remove some files now by hand...
build the example
LIBS=-L-levent_pthreads -L-levent -L-lssl -L-lcrypto
dmd -ofapp -I../../source -Isource -Jviews $LIBS @files.txt
The following files need to be removed from files.txt prior to
compilation as they are currently not compiling successfully:
I just did a quick test on windows, so no guarantee that the posix
version works correctly.