简体   繁体   中英

C++ (VS2008) object file not generated

I am trying to rebuild an ActiveX control in C++ using Visual Studio 2008. No object files are being generated for the control. When I try to compile a single file, I get no warnings and no errors, but no .obj file. I tried specifying a specific folder name in my project settings. The folder did not exist before compiling the file. After compiling it, the folder was created but it was empty. I have tried restarting VS 2008 and rebooting my computer. No change. What could be wrong?

I looked at the .vcproj file in Notepad. A configuration named Release contained this:

    <Tool
        Name="VCCLCompilerTool"
        Optimization="2"
        InlineFunctionExpansion="2"
        AdditionalIncludeDirectories="../Library,../sqlite3_v3,../CapsLib,../Logging,../SQLiteDirect,../DirectTrendData,../IniSTL"
        PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;USE_EVENT_LOGGING"
        StringPooling="true"
        RuntimeLibrary="2"
        EnableFunctionLevelLinking="true"
        PrecompiledHeaderFile=".\Release/HistoricalTrend.pch"
        AssemblerListingLocation=".\Release/"
        ObjectFile=".\Release/"
        ProgramDataBaseFileName=".\Release/"
        BrowseInformation="2"
        BrowseInformationFile=".\Release/"
        WarningLevel="3"
        SuppressStartupBanner="true"
    />

But the configuration I was using did not have the "ObjectFile=" line. I tried to add that line by itself, but got complaints about whitespace in the wrong place. So, I copied the entire Tool section from another configuration into my target configuration. I was able to load the project in VS 2008 and edit the configuration as I needed to.

I've no idea why that ObjectFile line was missing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM