User forums > General (but related to Code::Blocks)

Unable to compile a first D language program

(1/3) > >>

CodeBlocky:
I installed Code:Blocks for Windows and it detected the gcc C compiler and Digital Mars D compilers on my system. But when I created a D program and went to compile it Code::Blocks had set the GNU D compiler (GDC) as the compiler to use. That is not on my system and it failed. So I went and changed the compiler for the project to the DMD compiler. However, trying to compile with the Digital Mars compiler fails because Code::Blocks is putting a compiler option of -Wall which DMD does not support. I cannot see that setting in the Project->Build Options->Compiler Settings so I don't know how to get rid of it.

Miguel Gimenez:
You can look also in Settings -> Compiler

CodeBlocky:

--- Quote from: Miguel Gimenez on June 14, 2021, 08:43:52 am ---You can look also in Settings -> Compiler

--- End quote ---

Thanks for the reply. If I go there it gives me the settings which only apply to the DMD Windows compiler and there is no -Wall option and the "Other compiler options" tab is blank.

I notice that my "cbp" file was not updated when I changed the compiler in Code::Blocks. That file still thinks I am using gdc and has the -Wall option in it:

      <Compiler>
         <Add option="-Wall" />
      </Compiler>

 And yet doing a build invokes the DMD compiler??

But apparently it is ignoring that file as when I removed -Wall from it and set the correct compiler it still invokes DMD with the -Wall option.

I got out of Code::Blocks and back in and it still wants to add -Wall to a command line that is invoking DMD, which does not support that option.
------------------------------------------
I relooked at the cbp file and while I thought I had removed the -Wall option, it was still there. I removed it (again?) and then I was able to get a successful compile.

oBFusCATed:
This can be edited in the GUI using Project -> Build options -> [target or project] -> Compiler settings -> Other compiler settings

CodeBlocky:

--- Quote from: oBFusCATed on June 14, 2021, 09:59:35 am ---This can be edited in the GUI using Project -> Build options -> [target or project] -> Compiler settings -> Other compiler settings

--- End quote ---

Thanks for the reply.  I looked at that tab, but it was blank/empty.

Navigation

[0] Message Index

[#] Next page

Go to full version