/Za compiler option for single file

Hello, I use VS 2005 Express Beta2 for my native C++ coding.

Is it possible to apply compiler options only to certain files I would like to compile with /Za(disable extensions) for my main *.cpp and *.h files and leave standard options for other includes I use vector class and with /Za I get some errors from vector... My code compiles fine.



Answer this question

/Za compiler option for single file

  • atul_v

    I believe you can specify the exact compiler options for each *.cpp file. Right click on the file name and choose properties. Then adjust the "Configuration Properties"->"C/C++"->"Command Line". I am not sure if that is possible for header files. In this case, you can just move the header files to other cpp ones.

    Also, I found this link on how to have the /Za functionality within your code.
    http://msdn2.microsoft.com/library/ms168859(en-us,vs.80).aspx

    Hope this helps!

    Thanks,
      Ayman Shoukry
      VC++ Team



  • /Za compiler option for single file