Hi. I've looked around and just can't seem to find the answer, so I'm kinda getting impatient.
From the command line, DMD works just fine, but when I select Digital Mars DMD in the compiler settings for a simple project/file, it says
"test - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.
So I thought, maybe if I check those locations for the search directories options. Nothing. Probably doing something wrong. Anyway, I've been struggling and fighting too long now just to get things going. Getting DMD to work under Linux was also messed up, 'cause the instructions I had didn't seem too fresh or organized, as if it had errors. And now this shit. Maybe throwing my monitor out the window is the next step....? Help prevent me from resorting to such actions.
Ah, some progress :) I hadn't noticed the 'Toolchain Executables'. Now 'dmd' is called, but I'm getting errors:
-------------- Build: Debug in testingDMD2 ---------------
Linking console executable: bin/Debug/testingDMD2
obj/Debug/hello.o: In function `_D3std6format80__T14formattedWriteTS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterTaZ14formattedWriteFKS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterAxaZv':
/usr/local/bin/../src/phobos/std/format.d:2142: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
/usr/local/bin/../src/phobos/std/format.d:2151: undefined reference to `_D3std6format10FormatInfo6flDashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:2165: undefined reference to `_D3std6format10FormatInfo6flDashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:2194: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2194: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2199: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2199: undefined reference to `_D3std6format7__arrayZ'
obj/Debug/hello.o: In function `_D3std6format87__T19writeUpToFormatSpecTS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterTAxaZ19writeUpToFormatSpecFKS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterKAxaZv':
/usr/local/bin/../src/phobos/std/format.d:1736: undefined reference to `_D3std6format7__arrayZ'
obj/Debug/hello.o:/usr/local/bin/../src/phobos/std/format.d:1737: more undefined references to `_D3std6format7__arrayZ' follow
obj/Debug/hello.o: In function `_D3std6format25__T15parseFormatSpecTAxaZ15parseFormatSpecFKAxaZS3std6format10FormatInfo':
/usr/local/bin/../src/phobos/std/format.d:1643: undefined reference to `_D3std6format10FormatInfo6__initZ'
/usr/local/bin/../src/phobos/std/format.d:1643: undefined reference to `_D3std6format10FormatInfo6__initZ'
/usr/local/bin/../src/phobos/std/format.d:1647: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1649: undefined reference to `_D3std6format10FormatInfo6flDashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1650: undefined reference to `_D3std6format10FormatInfo6flPlusMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1651: undefined reference to `_D3std6format10FormatInfo6flHashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1652: undefined reference to `_D3std6format10FormatInfo6flZeroMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1653: undefined reference to `_D3std6format10FormatInfo7flSpaceMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1655: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1658: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1661: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1661: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
/usr/local/bin/../src/phobos/std/format.d:1671: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1674: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1687: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1689: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1692: undefined reference to `_D3std6format7__arrayZ'
obj/Debug/hello.o:/usr/local/bin/../src/phobos/std/format.d:1695: more undefined references to `_D3std6format7__arrayZ' follow
obj/Debug/hello.o: In function `_D3std6format25__T15parseFormatSpecTAxaZ15parseFormatSpecFKAxaZS3std6format10FormatInfo':
/usr/local/bin/../src/phobos/std/format.d:1695: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
/usr/local/bin/../src/phobos/std/format.d:1703: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1707: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1713: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1715: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1721: undefined reference to `_D3std6format7__arrayZ'
obj/Debug/hello.o:/usr/local/bin/../src/phobos/std/format.d:1721: more undefined references to `_D3std6format7__arrayZ' follow
obj/Debug/hello.o: In function `_D3std4conv25__T13parseIntegralTAxaTiZ13parseIntegralFKAxaZi':
/usr/local/bin/../src/phobos/std/conv.d:732: undefined reference to `_D3std4conv7__arrayZ'
/usr/local/bin/../src/phobos/std/conv.d:759: undefined reference to `_D3std4conv7__arrayZ'
/usr/local/bin/../src/phobos/std/conv.d:769: undefined reference to `_D3std4conv13conv_overflowFAyaZv'
obj/Debug/hello.o: In function `_D3std4conv22__T10conv_errorTAxaTiZ10conv_errorFAxaZv':
/usr/local/bin/../src/phobos/std/conv.d:67: undefined reference to `_D3std4conv9ConvError6__ctorMFAyaZC3std4conv9ConvError'
obj/Debug/hello.o: In function `_D3std4conv22__T10conv_errorTAxaTsZ10conv_errorFAxaZv':
/usr/local/bin/../src/phobos/std/conv.d:67: undefined reference to `_D3std4conv9ConvError6__ctorMFAyaZC3std4conv9ConvError'
obj/Debug/hello.o: In function `_D3std4conv24__T14numberToNumberTiThZ14numberToNumberFiZh':
/usr/local/bin/../src/phobos/std/conv.d:375: undefined reference to `_D3std4conv13conv_overflowFAyaZv'
/usr/local/bin/../src/phobos/std/conv.d:379: undefined reference to `_D3std4conv13conv_overflowFAyaZv'
obj/Debug/hello.o: In function `_D3std6format14__T9getNthIntZ9getNthIntFkZi':
/usr/local/bin/../src/phobos/std/format.d:2072: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
obj/Debug/hello.o: In function `_D3std4conv24__T14numberToNumberTiTsZ14numberToNumberFiZs':
/usr/local/bin/../src/phobos/std/conv.d:375: undefined reference to `_D3std4conv13conv_overflowFAyaZv'
/usr/local/bin/../src/phobos/std/conv.d:379: undefined reference to `_D3std4conv13conv_overflowFAyaZv'
obj/Debug/hello.o: In function `_D3std6format82__T14formattedWriteTS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterTaTaZ14formattedWriteFKS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterAxaaZv':
/usr/local/bin/../src/phobos/std/format.d:2142: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
/usr/local/bin/../src/phobos/std/format.d:2151: undefined reference to `_D3std6format10FormatInfo6flDashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:2165: undefined reference to `_D3std6format10FormatInfo6flDashMFbZv'
/usr/local/bin/../src/phobos/std/format.d:2194: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2194: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2199: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:2199: undefined reference to `_D3std6format7__arrayZ'
obj/Debug/hello.o: In function `_D3std6format80__T14formatIntegralTS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterTkZ14formatIntegralFKS3std5stdio25__T17PrivateFileWriterTaZ17PrivateFileWriterkS3std6format10FormatInfoZv':
/usr/local/bin/../src/phobos/std/format.d:1782: undefined reference to `_D3std6format10FormatInfo6flPlusMFZb'
/usr/local/bin/../src/phobos/std/format.d:1804: undefined reference to `_D3std6format10FormatInfo6flZeroMFbZv'
/usr/local/bin/../src/phobos/std/format.d:1807: undefined reference to `_D3std6format10FormatInfo6flDashMFZb'
/usr/local/bin/../src/phobos/std/format.d:1807: undefined reference to `_D3std6format10FormatInfo6flZeroMFZb'
/usr/local/bin/../src/phobos/std/format.d:1809: undefined reference to `_D3std6format10FormatInfo6flDashMFZb'
/usr/local/bin/../src/phobos/std/format.d:1809: undefined reference to `_D3std6format10FormatInfo6flZeroMFZb'
/usr/local/bin/../src/phobos/std/format.d:1820: undefined reference to `_D3std6format11FormatError6__ctorMFAyaZC3std6format11FormatError'
/usr/local/bin/../src/phobos/std/format.d:1823: undefined reference to `_D3std6format10FormatInfo6flPlusMFZb'
/usr/local/bin/../src/phobos/std/format.d:1824: undefined reference to `_D3std6format10FormatInfo7flSpaceMFZb'
/usr/local/bin/../src/phobos/std/format.d:1846: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1848: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1848: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1849: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1851: undefined reference to `_D3std6format7__arrayZ'
/usr/local/bin/../src/phobos/std/format.d:1854: undefined reference to `_D3std6format10FormatInfo6flHashMFZb'
/usr/local/bin/../src/phobos/std/format.d:1867: undefined reference to `_D3std6format10FormatInfo6flHashMFZb'
/usr/local/bin/../src/phobos/std/format.d:1885: undefined reference to `_D3std6format10FormatInfo6flHashMFZb'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
'Linker Settings' has:
'Link libraries':
pthread
m
phobos
Am I correct in assuming the problem is the DMD compiler itself?
Okay, when I try to 'Build & Run' my existing project with F9, the thing just seems okay and the program runs. But when I just do build I get
-------------- Build: Debug ---------------
dmd -Wall -I/usr/include/d/4.2.3 -I/usr/local/lib/phobos -I/usr/lib/phobos -c human.d -ofobj/Debug/human.o
Error: unrecognized switch '-Wall'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Arrrrrrgh!
And you know what? On the command line when I test a simple 'test.d' with 'dmd test' it says it cannot find 'object.d', and when I look for it it's nowhere to be seen. I mean, I followed those install instructions on the Digital Mars site EXACTLY, but.... arrrrgh. I'm going insane!
edit: yes, I also set DMD compiler to default, but it doesn't seem to matter. Grrrrr, I'm going to break something soon.
And I just tested a new project and it says
-------------- Build: Debug in fuck!!! ---------------
Compiling: hello.d
object.d: module object cannot read file 'object.d'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
so at least that gives me the same kind of message as in the command line. Maybe if I hit my head against the table long enough it'll work.