Skip to content

Commit 9a9362a

Browse files
committed
Adjust example project settings to work for release builds and x86.
1 parent a4420d2 commit 9a9362a

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

examples/ObjCWin32/ObjCWin32/ObjCWin32.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
2525
UNREFERENCED_PARAMETER(hPrevInstance);
2626
UNREFERENCED_PARAMETER(lpCmdLine);
2727

28-
// TODO: Place code here.
28+
NSLog(@"Hello Objective-C");
2929

3030
// Initialize global strings
3131
LoadStringW(hInstance, IDC_OBJCWIN32, szWindowClass, MAX_LOADSTRING);

examples/ObjCWin32/ObjCWin32/ObjCWin32.vcxproj

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3030
<ConfigurationType>Application</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v143</PlatformToolset>
32+
<PlatformToolset>ClangCL</PlatformToolset>
3333
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>Application</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v143</PlatformToolset>
38+
<PlatformToolset>ClangCL</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
4040
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
@@ -48,14 +48,11 @@
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>Application</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v143</PlatformToolset>
51+
<PlatformToolset>ClangCL</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
5555
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56-
<PropertyGroup>
57-
<LinkToolExe>link.exe</LinkToolExe>
58-
</PropertyGroup>
5956
<ImportGroup Label="ExtensionSettings">
6057
</ImportGroup>
6158
<ImportGroup Label="Shared">
@@ -75,28 +72,36 @@
7572
<PropertyGroup Label="UserMacros" />
7673
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7774
<LinkIncremental>true</LinkIncremental>
75+
<IncludePath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\include;$(IncludePath)</IncludePath>
76+
<LibraryPath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\lib;$(LibraryPath)</LibraryPath>
7877
</PropertyGroup>
7978
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
8079
<LinkIncremental>false</LinkIncremental>
80+
<IncludePath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\include;$(IncludePath)</IncludePath>
81+
<LibraryPath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\lib;$(LibraryPath)</LibraryPath>
8182
</PropertyGroup>
8283
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8384
<LinkIncremental>true</LinkIncremental>
84-
<IncludePath>C:\GNUstep\x64\Debug\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
85-
<LibraryPath>C:\GNUstep\x64\Debug\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
85+
<IncludePath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\include;$(IncludePath)</IncludePath>
86+
<LibraryPath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\lib;$(LibraryPath)</LibraryPath>
8687
</PropertyGroup>
8788
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
8889
<LinkIncremental>false</LinkIncremental>
90+
<IncludePath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\include;$(IncludePath)</IncludePath>
91+
<LibraryPath>C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\lib;$(LibraryPath)</LibraryPath>
8992
</PropertyGroup>
9093
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
9194
<ClCompile>
9295
<WarningLevel>Level3</WarningLevel>
9396
<SDLCheck>true</SDLCheck>
94-
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
97+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GNUSTEP;GNUSTEP_WITH_DLL;GNUSTEP_RUNTIME=1;_NONFRAGILE_ABI=1;_NATIVE_OBJC_EXCEPTIONS;GSWARN;GSDIAGNOSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9598
<ConformanceMode>true</ConformanceMode>
99+
<AdditionalOptions>-fobjc-runtime=gnustep-2.0 -Xclang -fexceptions -Xclang -fobjc-exceptions -fblocks -Xclang -fobjc-arc %(AdditionalOptions)</AdditionalOptions>
96100
</ClCompile>
97101
<Link>
98102
<SubSystem>Windows</SubSystem>
99103
<GenerateDebugInformation>true</GenerateDebugInformation>
104+
<AdditionalDependencies>gnustep-base.lib;objc.lib;%(AdditionalDependencies)</AdditionalDependencies>
100105
</Link>
101106
</ItemDefinitionGroup>
102107
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -105,14 +110,16 @@
105110
<FunctionLevelLinking>true</FunctionLevelLinking>
106111
<IntrinsicFunctions>true</IntrinsicFunctions>
107112
<SDLCheck>true</SDLCheck>
108-
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
113+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;GNUSTEP;GNUSTEP_WITH_DLL;GNUSTEP_RUNTIME=1;_NONFRAGILE_ABI=1;_NATIVE_OBJC_EXCEPTIONS;GSWARN;GSDIAGNOSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
109114
<ConformanceMode>true</ConformanceMode>
115+
<AdditionalOptions>-fobjc-runtime=gnustep-2.0 -Xclang -fexceptions -Xclang -fobjc-exceptions -fblocks -Xclang -fobjc-arc %(AdditionalOptions)</AdditionalOptions>
110116
</ClCompile>
111117
<Link>
112118
<SubSystem>Windows</SubSystem>
113119
<EnableCOMDATFolding>true</EnableCOMDATFolding>
114120
<OptimizeReferences>true</OptimizeReferences>
115121
<GenerateDebugInformation>true</GenerateDebugInformation>
122+
<AdditionalDependencies>gnustep-base.lib;objc.lib;%(AdditionalDependencies)</AdditionalDependencies>
116123
</Link>
117124
</ItemDefinitionGroup>
118125
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -135,14 +142,16 @@
135142
<FunctionLevelLinking>true</FunctionLevelLinking>
136143
<IntrinsicFunctions>true</IntrinsicFunctions>
137144
<SDLCheck>true</SDLCheck>
138-
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
145+
<PreprocessorDefinitions>NDEBUG;_WINDOWS;GNUSTEP;GNUSTEP_WITH_DLL;GNUSTEP_RUNTIME=1;_NONFRAGILE_ABI=1;_NATIVE_OBJC_EXCEPTIONS;GSWARN;GSDIAGNOSE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
139146
<ConformanceMode>true</ConformanceMode>
147+
<AdditionalOptions>-fobjc-runtime=gnustep-2.0 -Xclang -fexceptions -Xclang -fobjc-exceptions -fblocks -Xclang -fobjc-arc %(AdditionalOptions)</AdditionalOptions>
140148
</ClCompile>
141149
<Link>
142150
<SubSystem>Windows</SubSystem>
143151
<EnableCOMDATFolding>true</EnableCOMDATFolding>
144152
<OptimizeReferences>true</OptimizeReferences>
145153
<GenerateDebugInformation>true</GenerateDebugInformation>
154+
<AdditionalDependencies>gnustep-base.lib;objc.lib;dispatch.lib;%(AdditionalDependencies)</AdditionalDependencies>
146155
</Link>
147156
</ItemDefinitionGroup>
148157
<ItemGroup>
@@ -155,6 +164,12 @@
155164
<ClCompile Include="ObjCWin32.mm">
156165
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
157166
</CompileAs>
167+
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
168+
</CompileAs>
169+
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
170+
</CompileAs>
171+
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
172+
</CompileAs>
158173
</ClCompile>
159174
</ItemGroup>
160175
<ItemGroup>
@@ -168,7 +183,7 @@
168183
<ImportGroup Label="ExtensionTargets">
169184
</ImportGroup>
170185
<ItemGroup>
171-
<Content Include="C:\GNUstep\x64\Debug\bin\*.dll">
186+
<Content Include="C:\GNUstep\$(LibrariesArchitecture)\$(Configuration)\bin\*.dll">
172187
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
173188
<TargetPath>%(Filename)%(Extension)</TargetPath>
174189
</Content>

0 commit comments

Comments
 (0)