Author Topic: DMD compiler error within Code::Blocks  (Read 2588 times)

Offline unixpgmr

  • Single posting newcomer
  • *
  • Posts: 3
DMD compiler error within Code::Blocks
« on: April 08, 2018, 04:21:32 pm »
I created a console D program within Code::Blocks 17.12. I am using the DMD2 compiler.  I get the following error message when I either Build or compile the file (single file program):
Code
[100.0%] dmc.exe -mn -c  -g    -IC:\D\dmd2\windows\bin -IC:\d\stlport\stlport -IC:\d\include -IC:\D\dmd2\windows\stlport\stlport -IC:\D\dmd2\windows\include -oobj\Debug\qDNS.obj qDNS.d
Execution of 'dmc.exe -mn -c  -g    -IC:\D\dmd2\windows\bin -IC:\d\stlport\stlport -IC:\d\include -IC:\D\dmd2\windows\stlport\stlport -IC:\D\dmd2\windows\include -oobj\Debug\qDNS.obj qDNS.d' in 'C:\Users\mts\CodingProj\queryDNS' failed.

When I compile outside of Code::Blocks, via the command line, using the following command:
Code
c:\coding>dmd qDNS.d
it works just fine.  I can't find where these paths are set. The includes don't even exist. I would really like to use Code::Blocks as an IDE, and not just a text editor. Has anybody seen this before?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: DMD compiler error within Code::Blocks
« Reply #1 on: April 08, 2018, 05:38:38 pm »
What happens if you execute the whole command line? Does it fail the same? Can you find the flag that causes the problem?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline unixpgmr

  • Single posting newcomer
  • *
  • Posts: 3
Re: DMD compiler error within Code::Blocks
« Reply #2 on: April 08, 2018, 06:15:17 pm »
Thank you.  I can't believe I missed it.  I wanted to run the Digital Mars D compiler and that was what was set up in the toolchain set. However, when I went into the Project->Build Option, the compiler was set for Digital Mars C compiler. I reset it to Digital Mars D Compiler.

That seemed to fix that problem. Now I am getting the following issue:
Code
[ 33.3%] dmd.exe  -g    -IC:\D\dmd2\windows\src\phobos -c cmdLine.d -ofobj\Debug\cmdLine.obj
[ 66.7%] dmd.exe  -g    -IC:\D\dmd2\windows\src\phobos -c qDNS.d -ofobj\Debug\qDNS.obj
[100.0%] dmd.exe bin\Debug\queryDNS.exe  obj\Debug\cmdLine.obj obj\Debug\qDNS.obj  phobos.lib
Error: linker exited with status 1
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 3: Cannot Create File bin\Debug\queryDNS.exe
Process terminated with status 1 (4 minute(s), 41 second(s))
3 error(s), 0 warning(s) (4 minute(s), 41 second(s))

I tried it manually in the current directory and I got the following:
Code
c:\queryDNS>dmd.exe queryDNS.exe cmdLine.obj qDNS.obj  phobos.lib
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 3: Cannot Create File queryDNS.exe
Error: linker exited with status 1

What do you make of it?



Offline unixpgmr

  • Single posting newcomer
  • *
  • Posts: 3
Re: DMD compiler error within Code::Blocks
« Reply #3 on: April 08, 2018, 07:24:59 pm »
I figured out what the issue was. My antivirus (Bitdefender) was thinking that the final exe (queryDNS) was infected with Gen:Trojan.Heur.GM.04400400A0. However, the notification was silent.  I need to figure out how to prevent this from happening.