Author Topic: DMD 2.x, Linux, C::B 8.02  (Read 6341 times)

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
DMD 2.x, Linux, C::B 8.02
« on: September 03, 2008, 07:34:29 pm »
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
Code
"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.

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
Re: DMD 2.x, Linux, C::B 8.02
« Reply #1 on: September 04, 2008, 05:45:11 pm »
Damn. None of you guys can help?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: DMD 2.x, Linux, C::B 8.02
« Reply #2 on: September 05, 2008, 12:30:37 am »
Did you set the path to the folder that contains the bin folder?

Did you check the compiler settings in other words?

IIRC, Settings -> Compiler & debugger
Tab Path executables

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
Re: DMD 2.x, Linux, C::B 8.02
« Reply #3 on: September 05, 2008, 01:45:49 am »
Ah, some progress :) I hadn't noticed the 'Toolchain Executables'. Now 'dmd' is called, but I'm getting errors:

Code

-------------- 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:
Code
'Link libraries':

pthread
m
phobos

Am I correct in assuming the problem is the DMD compiler itself?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: DMD 2.x, Linux, C::B 8.02
« Reply #4 on: September 05, 2008, 04:32:56 am »
What libraries are the undefined in?
like this one _D3std6format7__arrayZ

Turn on compiler logging by
http://wiki.codeblocks.org/index.php?title=FAQ&Itemid=5#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Verify the command line is correct; verify the library search path/folders are correct.

Tim S




« Last Edit: September 05, 2008, 04:34:43 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
Re: DMD 2.x, Linux, C::B 8.02
« Reply #5 on: September 05, 2008, 04:21:51 pm »
Saw your message just now. I had quickly removed D 2.xxx and installed 1.xxx. It works pretty nice, as far as I can tell. I don't know precisely, but I guess 2.xxx is too unstable compared to 1.xxx, or D1 code in some parts doesn't work with D2. I might have made a mistake when installing D2. In any case, D1 works, and thanks for your help :)


FWIW, when testing and getting '_D3std6format7__arrayZ', it looked totally unfamiliar to me. And that whole list of errors is what I got with just some very simple code of a few lines.


EDIT: I think I cheered too soon  :x I now noticed that upon a new project, I'm getting errors, but when I tested it before on an existing project it worked. On the existing project I switched the project compiler settings from GDC to DMD. Having both installed shouldn't be a problem, right?
« Last Edit: September 05, 2008, 04:28:50 pm by Brendan »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: DMD 2.x, Linux, C::B 8.02
« Reply #6 on: September 05, 2008, 05:09:30 pm »
EDIT: I think I cheered too soon  :x I now noticed that upon a new project, I'm getting errors, but when I tested it before on an existing project it worked. On the existing project I switched the project compiler settings from GDC to DMD. Having both installed shouldn't be a problem, right?

Both installed should cause no problem; just make sure the configurations is correct.

The Toolchain executables and additional paths are very important.

Note: There has been time that I thought C::B did things wrong when I did not have the compiler used in a project also the compiler that was the default Compiler. But, I was never able to duplicate the problem consistently.

In other words try, "Settings" -> "Compiler and Debugger" make the default compiler the one you are using and see if problem goes away.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
Re: DMD 1.x, Linux, C::B 8.02
« Reply #7 on: September 05, 2008, 11:37:47 pm »
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
Code

-------------- 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.

Offline Brendan

  • Single posting newcomer
  • *
  • Posts: 6
Re: DMD 2.x, Linux, C::B 8.02
« Reply #8 on: September 05, 2008, 11:46:52 pm »
And I just tested a new project and it says
Code

-------------- 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.