From: Haiping on
Hello,

When I compile my C++ application in VS 2005 I got the follwoing compiler
error:
command line error MIDL1004 : cannot execute C preprocessor cl.exe midl

In the putput:
20>Creating Type Library...
20>Processing .\UnitConverter.idl
20>midl : command line error MIDL1004 : cannot execute C preprocessor cl.exe
20>Build log was saved at
"file://v:\MyApplication\MyProject\DebugU\BuildLog.htm"
20>UnitConverter - 1 error(s), 0 warning(s)

But when I go to DebugU\BuildLog.htm following the instruction in
BuldLob.htm and fun the cl.exe in VS command Prompt it works without any
problem.

Any body has experience this and have any solutin for this?

Thank you,




From: AliR on
I've seen this problem, I can't remember which solved it, rebuild of
project, or close and reopen VS.

AliR.


"Haiping" <Haiping(a)discussions.microsoft.com> wrote in message
news:8F182158-5DE3-45AD-86A6-D2A5DB014705(a)microsoft.com...
> Hello,
>
> When I compile my C++ application in VS 2005 I got the follwoing compiler
> error:
> command line error MIDL1004 : cannot execute C preprocessor cl.exe midl
>
> In the putput:
> 20>Creating Type Library...
> 20>Processing .\UnitConverter.idl
> 20>midl : command line error MIDL1004 : cannot execute C preprocessor
> cl.exe
> 20>Build log was saved at
> "file://v:\MyApplication\MyProject\DebugU\BuildLog.htm"
> 20>UnitConverter - 1 error(s), 0 warning(s)
>
> But when I go to DebugU\BuildLog.htm following the instruction in
> BuldLob.htm and fun the cl.exe in VS command Prompt it works without any
> problem.
>
> Any body has experience this and have any solutin for this?
>
> Thank you,
>
>
>
>


From: Tom Serface on
I would suggest deleting all of the temp files, rebooting, and doing a
rebuild all. That sounds like a drag, but it usually only takes a few
minutes and covers over a lot of sins.

If it continues to happen you may want to check your build order to make
sure something it's getting done in a different order in the debug vs.
release modes.

Tom

"Haiping" <Haiping(a)discussions.microsoft.com> wrote in message
news:8F182158-5DE3-45AD-86A6-D2A5DB014705(a)microsoft.com...
> Hello,
>
> When I compile my C++ application in VS 2005 I got the follwoing compiler
> error:
> command line error MIDL1004 : cannot execute C preprocessor cl.exe midl
>
> In the putput:
> 20>Creating Type Library...
> 20>Processing .\UnitConverter.idl
> 20>midl : command line error MIDL1004 : cannot execute C preprocessor
> cl.exe
> 20>Build log was saved at
> "file://v:\MyApplication\MyProject\DebugU\BuildLog.htm"
> 20>UnitConverter - 1 error(s), 0 warning(s)
>
> But when I go to DebugU\BuildLog.htm following the instruction in
> BuldLob.htm and fun the cl.exe in VS command Prompt it works without any
> problem.
>
> Any body has experience this and have any solutin for this?
>
> Thank you,
>
>
>
>