开发者

VC++ project type

I'm developing a tool using native c+开发者_JAVA技巧+ and boost (on VC++2008) which takes a .vcproj file and generates an equivalant makefile. I can't seem to find the type of the VS project build output in the .vcproj file (or in the other files for that matter).

I'm refering to the

Project Properties > Config Properties > General > Project Defaults > Configuration type

Where does VS2008 store this config for VC++ projects? What I need is to determine if the project is an executable or a library...

Thanks a lot in advance for your help :)


If you are reading the vcproj file as an XML document then you should see an element that looks something like this ...

    <Configuration
        Name="Debug|Win32"
        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
        IntermediateDirectory="$(ConfigurationName)"
        ConfigurationType="1"
        CharacterSet="1"
        >

The ConfigurationType attribute is what you are looking for I think. Note that there is a separate Cpnfiguration element for each Configuration name (Debug, Release, etc.) and each Platform (Win32, x64, IA64, etc.) in your project.

The problem with reading and writing raw XML is that definitions can change over time. Not very likely with a released product like Visual Studio 2008. Perhaps not even likely in a future Visual Studio release, but not impossible.

You might be better using the VCConfiguration object to manipulate the ConfigurationType property to achieve your ends.


I think it's the

VisualStudioProject/Configurations/Configuration/ConfigurationType

attribute in the vcproj. It looks like "1" for a .dll and "4" for a .exe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜