User forums > General (but related to Code::Blocks)
DMD compiler problems... -Wall option?
MortenMacFly:
Ok - I'm through now and to sum up: It works!
Here the simple steps that I've done to attach the Digital Mars D compiler and using the wizard to create a hello world application without any trouble:
1.) D/L dmd.zip and dmc.zip and extracted them in a directory (just as suggested on the DMD homepage at http://www.digitalmars.com/d/dcompiler.html).
--> This created two sub-folders "dm" and "dmd"
2.) Setup the DMD compiler in C::B:
- set the base path to [DMD]\dmd
- add additional path [DMD]\dm\bin
- setup the compiler include path to [DMD]\dmd\src\dmd and [DMD]\dmd\src\phobos
- setup the linker include path to [DMD]\dmd\lib and [DMD]\dm\lib
- left everything else as it is.
3.) Started the D application wizard, selected "DMD" as compiler --> compiles and runs just fine... no illegal switches, nothing. What is your problem???
With regards, Morten.
Silverling:
Yep, the option is there. I didn't find it because it wasn't under a Build Option specifically. However, I meddle overmuch with the compiler options and there is no "Reset" button :$:$:$ Sorry... I tried to uninstall B::C and delete the config records on the system registry, but my settings remained there... How do I reset all compiler settings?
By the way, I can now find the linker. The DMD package with the linker extracted all files to another folder called "DM" instead of "DMD", so the linker didn't get in place (at least where C::B searched). I corrected that already.
MortenMacFly:
--- Quote from: Silverling on November 23, 2006, 01:38:27 pm ---How do I reset all compiler settings?
--- End quote ---
If you are using the nightly build than there is no registry usage at all. In that case goto "Documents and settings\[your_user_id]\Application Data\codeblocks" and delete all *.conf files (in fact usually there is only one: default.conf unless you are using different layouts).
--- Quote from: Silverling on November 23, 2006, 01:38:27 pm ---By the way, I can now find the linker. The DMD package with the linker extracted all files to another folder called "DM" instead of "DMD", so the linker didn't get in place (at least where C::B searched). I corrected that already.
--- End quote ---
BTW: It isn't C::B searching there bit the DMD compiler itself. So DMD is the one to blame for this issue. But actually this is described in detail how it works on their webpage and if the software is installed as proposed there is no such issue...
With regards, Morten.
Ps.: After that discussion what's actually left to clarify/fix...?! I'm a bit lost now... ;-)
Biplab:
Hi,
This bug exists for Borland C++ Compiler 5.5 too. To reproduce the bug, click File -> New -> Project, select Console Application and later select Borland C++ 5.5 compiler. A default project with some code will be generated. Try building it, you'll get the following message.
--- Quote ---:: === TestApp, Debug ===
:: Error E2075: Incorrect command line option: -Wall
:: === Build finished: 1 errors, 0 warnings ===
--- End quote ---
You won't get the option in Build Options dialog but the error will keep coming up. Now close the project and open the project file in Notepad++ or similar app, you'll see the following lines.
--- Code: --- <Target title="Release">
<Option output=".\TestApp.exe" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="bcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="main.cpp">
<Option compilerVar="CPP" />
<Option target="Debug" />
<Option target="Release" />
</Unit>
--- End code ---
Remove the code in between
--- Code: (xml) ---<compiler></compiler>
--- End code ---
and save the file. Now it will compile without any problem.
I am using Code::Blocks (svn build rev 3253 (2006-11-21 13:59:39) gcc 3.4.5 Windows/unicode)
Regards,
Biplab Kumar Modak
killerbot:
the project wizard script should be checked, probably add this options in too many cases --> probably only valid for gnu ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version