Skip to content

Commit 88e5fd8

Browse files
authored
Troubleshoot interop problems (#54)
1 parent 567e926 commit 88e5fd8

25 files changed

+19780
-183
lines changed

Diff for: ConsoleApplication/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
x64
2+
*.vcxproj.user
3+
*.svg

Diff for: ConsoleApplication/ConsoleApplication.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <iostream>
2+
#include <conio.h>
3+
4+
using namespace std;
5+
6+
extern "C" {
7+
__declspec(dllimport) int stackoverflow_repro();
8+
__declspec(dllimport) int missing_label_repro();
9+
__declspec(dllimport) int test_agread();
10+
__declspec(dllimport) int test_agmemread();
11+
__declspec(dllimport) int test_rj_agmemread();
12+
}
13+
14+
int main()
15+
{
16+
cout << "Make sure to set the current working directory to the repository root!" << endl;
17+
cout << "Running tests..." << endl;
18+
19+
cout << test_agread() << endl;
20+
cout << test_agmemread() << endl;
21+
cout << test_rj_agmemread() << endl;
22+
cout << missing_label_repro() << endl;
23+
cout << stackoverflow_repro() << endl;
24+
25+
cout << "Press key to exit..";
26+
auto c = _getch();
27+
}

Diff for: ConsoleApplication/ConsoleApplication.vcxproj

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|x64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|x64">
9+
<Configuration>Release</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<VCProjectVersion>17.0</VCProjectVersion>
15+
<Keyword>Win32Proj</Keyword>
16+
<ProjectGuid>{27a1d045-b8c9-4785-a2da-ecac48158725}</ProjectGuid>
17+
<RootNamespace>ConsoleApplication</RootNamespace>
18+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
19+
</PropertyGroup>
20+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
22+
<ConfigurationType>Application</ConfigurationType>
23+
<UseDebugLibraries>true</UseDebugLibraries>
24+
<PlatformToolset>v143</PlatformToolset>
25+
<CharacterSet>Unicode</CharacterSet>
26+
</PropertyGroup>
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
28+
<ConfigurationType>Application</ConfigurationType>
29+
<UseDebugLibraries>false</UseDebugLibraries>
30+
<PlatformToolset>v143</PlatformToolset>
31+
<WholeProgramOptimization>true</WholeProgramOptimization>
32+
<CharacterSet>Unicode</CharacterSet>
33+
</PropertyGroup>
34+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
35+
<ImportGroup Label="ExtensionSettings">
36+
</ImportGroup>
37+
<ImportGroup Label="Shared">
38+
</ImportGroup>
39+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
40+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
41+
</ImportGroup>
42+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
43+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
44+
</ImportGroup>
45+
<PropertyGroup Label="UserMacros" />
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
47+
<OutDir>../Rubjerg.Graphviz/</OutDir>
48+
</PropertyGroup>
49+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
50+
<ClCompile>
51+
<WarningLevel>Level3</WarningLevel>
52+
<SDLCheck>true</SDLCheck>
53+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
54+
<ConformanceMode>true</ConformanceMode>
55+
</ClCompile>
56+
<Link>
57+
<SubSystem>Console</SubSystem>
58+
<GenerateDebugInformation>true</GenerateDebugInformation>
59+
<AdditionalDependencies>..\Rubjerg.Graphviz\GraphvizWrapper.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
60+
</Link>
61+
<ProjectReference>
62+
<LinkLibraryDependencies>false</LinkLibraryDependencies>
63+
</ProjectReference>
64+
</ItemDefinitionGroup>
65+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
66+
<ClCompile>
67+
<WarningLevel>Level3</WarningLevel>
68+
<FunctionLevelLinking>true</FunctionLevelLinking>
69+
<IntrinsicFunctions>true</IntrinsicFunctions>
70+
<SDLCheck>true</SDLCheck>
71+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
72+
<ConformanceMode>true</ConformanceMode>
73+
</ClCompile>
74+
<Link>
75+
<SubSystem>Console</SubSystem>
76+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
77+
<OptimizeReferences>true</OptimizeReferences>
78+
<GenerateDebugInformation>true</GenerateDebugInformation>
79+
</Link>
80+
</ItemDefinitionGroup>
81+
<ItemGroup>
82+
<ClCompile Include="ConsoleApplication.cpp" />
83+
</ItemGroup>
84+
<ItemGroup>
85+
<ProjectReference Include="..\GraphvizWrapper\GraphvizWrapper.vcxproj">
86+
<Project>{f9bc5523-352d-469f-8dbb-97eca9d70648}</Project>
87+
</ProjectReference>
88+
</ItemGroup>
89+
<ItemGroup>
90+
<CopyFileToFolders Include="missing-label-repro.dot">
91+
<FileType>Document</FileType>
92+
</CopyFileToFolders>
93+
<CopyFileToFolders Include="stackoverflow-repro.dot">
94+
<FileType>Document</FileType>
95+
</CopyFileToFolders>
96+
</ItemGroup>
97+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
98+
<ImportGroup Label="ExtensionTargets">
99+
</ImportGroup>
100+
</Project>
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="ConsoleApplication.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<CopyFileToFolders Include="missing-label-repro.dot" />
24+
<CopyFileToFolders Include="stackoverflow-repro.dot" />
25+
</ItemGroup>
26+
</Project>

Diff for: ConsoleApplication/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This project only exists to debug various interop related problems.

Diff for: ConsoleApplication/missing-label-repro.dot

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
digraph {
2+
compound=true;
3+
node [shape=Mrecord]
4+
rankdir="LR"
5+
6+
subgraph "clusterOpen"
7+
{
8+
label = "Open"
9+
"Assigned" [label="Assigned|exit / OnDeassigned"];
10+
}
11+
"Deferred" [label="Deferred|entry / Function"];
12+
"Closed" [label="Closed"];
13+
14+
"OpenNode" -> "Assigned" [style="solid", label="Assign / OnAssigned"];
15+
"Assigned" -> "Assigned" [style="solid", label="Assign"];
16+
"Assigned" -> "Closed" [style="solid", label="Close"];
17+
"Assigned" -> "Deferred" [style="solid", label="Defer"];
18+
"Deferred" -> "Assigned" [style="solid", label="Assign / OnAssigned"];
19+
init [label="", shape=point];
20+
init -> "OpenNode"[style = "solid"]
21+
}

0 commit comments

Comments
 (0)