Browse Source

解决Release编译问题。

jianfeng1.wang 2 năm trước cách đây
mục cha
commit
67a7202fa6
2 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 2 3
      xlnt/xlnt.test.vcxproj
  2. 8 0
      xlnt/xlnt.vcxproj

+ 2 - 3
xlnt/xlnt.test.vcxproj

@@ -150,7 +150,7 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <UseFullPaths>false</UseFullPaths>
       <WarningLevel>Level3</WarningLevel>
-      <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;XLNT_TEST_DATA_DIR=E:/DevCode/xlnt/tests/data;CMAKE_INTDIR="Release"</PreprocessorDefinitions>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;NDEBUG;XLNT_TEST_DATA_DIR=E:/DevCode/xlnt/tests/data;CMAKE_INTDIR="Release";LIBSTUDXML_STATIC_LIB</PreprocessorDefinitions>
       <ObjectFileName>$(IntDir)</ObjectFileName>
       <DebugInformationFormat>
       </DebugInformationFormat>
@@ -174,8 +174,7 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
       </Command>
     </PostBuildEvent>
     <Link>
-      <AdditionalDependencies>
-      </AdditionalDependencies>
+      <AdditionalDependencies>xlnt.lib;libstudxml.lib</AdditionalDependencies>
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
       <GenerateDebugInformation>false</GenerateDebugInformation>

+ 8 - 0
xlnt/xlnt.vcxproj

@@ -121,6 +121,10 @@
     <ProjectReference>
       <LinkLibraryDependencies>false</LinkLibraryDependencies>
     </ProjectReference>
+    <PostBuildEvent>
+      <Command>copy $(OutDir)$(TargetName).lib $(TargetName).lib /y/a
+copy $(OutDir)$(TargetName)$(TargetExt) $(TargetName)$(TargetExt) /y/a</Command>
+    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
@@ -167,6 +171,10 @@
     <ProjectReference>
       <LinkLibraryDependencies>false</LinkLibraryDependencies>
     </ProjectReference>
+    <PostBuildEvent>
+      <Command>copy $(OutDir)$(TargetName).lib $(TargetName).lib /y/a
+copy $(OutDir)$(TargetName)$(TargetExt) $(TargetName)$(TargetExt) /y/a</Command>
+    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
     <ClCompile>