views:

111

answers:

1

Hello everyone,

I would like to change the output file name based on certain criteria that I'm checking with #defines. A little background, I'm doing this because I've decided to use VS2010 in one of my projects to regain intellisense. However, this is causing some other problems with Google Test, and the rest of my team is on VS2008. So, I would like to build a GTEST_VS2010.lib if I'm on VS2010, and GTEST.lib otherwise. I was hoping I could trick the compiler with #pragma comment(linker... but that doesn't seem to be allowed by MS. Thanks for any help.

+1  A: 

VS2010 converts project and solution files, doesn't it? Then you don't have a problem since you can't use the project file with VS2008 anyway. Just change the linker's Output File setting.

Otherwise, you probably should just consider adding another configuration to your solution.

Hans Passant
of course, thanks!
Steve