Posted: 11/18/10 17:29:27
I managed to generate the libtango.dylib in the trunk directory:
bert@phynix2:trunk $ ./build/script/bob.rb -r dmd -c dmd -d .
tango.core.Atomic is deprecated. Please use tango.core.sync.Atomic instead.
tango.io.FileScan is deprecated. Please use tango.io.FilePath.toList or tango.io.vfs.* instead.
413 files
To test things out I switched to a 'dlang' working directory containing the main.d example from http://www.dsource.org/projects/tango/wiki/ManualMacOSXInstall
bert@phynix2:trunk $ cd /Users/bert/workspaces/dlang
bert@phynix2:dlang $ which dmd
/opt/dmd/bin/dmd
bert@phynix2:dlang $ dmd main.d
object.d: Error: module object is in file 'object.d' which cannot be read
Specify path to file 'object.d' with -I switch
I only could find a 'object.di' file in the trunk which I copied to 'object.d'. I added a switch -I/Users/bert/Downloads/sw/dmd-tango/trunk to point to object.d. Unfortunately, I only got errors:
bert@phynix2:dlang $ dmd main.d
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
"_D14TypeInfo_Tuple6__vtblZ", referenced from:
_D13TypeInfo_B2Aa6__initZ in main.o
"_D5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput5printMFYC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput", referenced from:
__Dmain in main.o
"_D5tango2io6Stdout6StdoutC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput", referenced from:
_D5tango2io6Stdout6StdoutC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput$non_lazy_ptr in main.o
(maybe you meant: _D5tango2io6Stdout6StdoutC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput$non_lazy_ptr)
"_D5tango2io6Stdout12__ModuleInfoZ", referenced from:
_D4main12__ModuleInfoZ in main.o
"_D5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput7newlineMFZC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput", referenced from:
__Dmain in main.o
"_D10ModuleInfo6__vtblZ", referenced from:
_D4main12__ModuleInfoZ in main.o
"_D11TypeInfo_Aa6__initZ", referenced from:
internal in main.o
ld: symbol(s) not found
After a change in the conf file:
bert@phynix2:dlang $ dmd main.d
ld: library not found for -lphobos
collect2: ld returned 1 exit status
--- errorlevel 1
Probably my conf file is incorrect (I have no experience with this). I have the following in 'DFLAGS=':
-I/Users/bert/Downloads/sw/dmd2/src/phobos (to point to the standard phobos sources)
-L-rpath (your suggestion)
-I/Users/bert/Downloads/sw/dmd-tango/trunk (to point to object.d, renamed from object.di)
-L/Users/bert/Downloads/sw/dmd-tango/trunk (to point to the generated tango.dylib)
-L/opt/dmd/lib (to point to the libphobos.a coming with the D Compiler v1.065)
Can you put me in the right direction?
-- Bert Fitié