Code::Blocks Forums

User forums => Help => Topic started by: wiz on August 19, 2005, 10:27:22 am

Title: Issue with VC++ compiler options
Post by: wiz on August 19, 2005, 10:27:22 am
Hi, everyone. My situation is as follows: I'm trying to build the Yake engine using CodeBlocks RC1-1 and Microsoft Visual C++ Toolkit. I imported a .vcproj file inside CB and everything seems to work fine; but, when I begin the compilation, I receive the following message for each source file:

cl : Command line warning D4025 : overriding '/MDd' with '/MT'

This message is related with the debug settings.

In order to compile the engine correctly, I must remove the '/MT' option from the compiler, but I can't find a way of doing it! Does anyone know a way of achieving it?

Thanks in advance!  :D
Edgard
Title: Re: Issue with VC++ compiler options
Post by: Vampyre_Dark on August 19, 2005, 10:44:57 am
Woudln't this be in the build options? Right click on the project, and select Build Options. There is a panel of boxes you can toggle, and then another tab with extra typed in commands. Should be in there.
Title: Re: Issue with VC++ compiler options
Post by: wiz on August 19, 2005, 05:52:46 pm
No, this isn't, I already looked up all of the options. The '/MT' option is set under the hood, and I can't find a way to access it...  :(
Title: Re: Issue with VC++ compiler options
Post by: rickg22 on August 19, 2005, 06:19:34 pm
Are you sure that's NOT a linker message? (You know Microsoft tools, they do whatever they please)
Title: Re: Issue with VC++ compiler options
Post by: tiwag on August 19, 2005, 08:56:01 pm
"/MT" is selected with the Multi-threaded Runtime Library
"/MTd" is selected with the Multi-threaded Debug Runtime Library

select only one of the runtime options


[attachment deleted by admin]
Title: Re: Issue with VC++ compiler options
Post by: Vampyre_Dark on August 20, 2005, 04:55:18 pm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefcompileroptionslistedalphabetically.asp Check this page out. Very helpful.
Title: Re: Issue with VC++ compiler options
Post by: wiz on August 21, 2005, 12:04:14 am
Hi, again. Thanks for the tips, everyone! I think I've found the problem...  :oops:

Apparently, you can set the compiler options in three different places:

1. Right-clicking on a project, selecting 'Build options' and setting the compiler options for each build target separately;
2. Right-clicking on a project, selecting 'Build options' and setting common compiler options for all the build targets (clicking on the project name in the upper left corner of the dialog box);
3. Selecting the menu Settings>>Compiler and setting the options there.

Here's my guess: the compiler evaluates the options set in each of these cases in the opposite order I listed them, that is, first case 3, then case 2 and, finally, case 1. I'd set the '/MT' flag inside the Settings>>Compiler option, so it was staying in the rightmost side of the command line, being evaluated last and overriding the 'MDd' flag... what a mess I've made!!!

Anyway, once again, thanks for the tips! They were important so I could force my brain to find the solution!  :D

Best regards,
Edgard

PS: tiwag, the picture you attached shows the compiler options' names followed by their correspondent flags. How did you do it? Is it a CVS-based version?

Title: Re: Issue with VC++ compiler options
Post by: rickg22 on August 21, 2005, 08:26:11 am
If what you said is true, then the checking isn't done regarding target / project / global options. In that case, it IS a bug. *PLEASE* file a bug report about it.

(And yes, that screenshot is of the CVS version :) )
Title: Re: Issue with VC++ compiler options
Post by: mandrav on August 21, 2005, 09:22:32 am
If what you said is true, then the checking isn't done regarding target / project / global options. In that case, it IS a bug. *PLEASE* file a bug report about it.

What he said is correct behaviour and it's not a bug.

Yiannis.
Title: Re: Issue with VC++ compiler options
Post by: tiwag on August 21, 2005, 12:45:56 pm
PS: tiwag, the picture you attached shows the compiler options' names followed by their correspondent flags.
How did you do it? Is it a CVS-based version?
yes it annoyed me often that i didn't know which option is hidden under the description of the various entries in the listbox
so i decided to add the [option] itself in the listbox-description text.
i published a patch for that and in the meantime it's also incorporated into the cvs version.
Title: Re: Issue with VC++ compiler options
Post by: wiz on August 21, 2005, 05:56:37 pm
Thank you, guys, no more doubts!  :D
Title: Re: Issue with VC++ compiler options
Post by: zieQ on August 21, 2005, 08:00:28 pm
As a side note, actually there's no way to tell C::B that some compiler options are mutually exclusive. That's why there may be some problems/bugs with options. A redesign of the compiler plugin has been suggested but it's not for soon, sorry.

PS: I've just come back too ;)