Valid set of options in nmake

151 views Asked by At

I have an application that compiles fine with nmake. But it does not compile in debug mode. So I edited .mak file and added /Debug for "link" options and "Zi" for "cl.exe" options. During compilation it looks like this now: cl -I ../../../ -DEXTRACT_ONLY -DNO_READ_FROM_CODER -D_SFX -Gr -c -FoO/ -WX -EHsc -Gy -GR- /Zi -MT -W4 -GS- -Zc:forScope -O1 -Yu"StdAfx.h" -FpO/a.pch abc.cpp and I get this error: error C2855: command-line option '/Zi' inconsistent with precompiled header

Q1: Can I simply remove options like -Yu or -Fpo and it will still work ( though take longer to compile because there is no recompiled stuff now)? Q2. Is there an option of nmake to clean all files generated by it. ( I am using .mak files ) Note: I am in vs2010 world.

1

There are 1 answers

0
qqqqq On BEST ANSWER

Answer to Q1: I removed -Yu and -Fpo and it compiled. Now I am able to debug. Note that Q2 still remain unanswered.