<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic FileGDBAPI.dll is not compatible with programs using static C runtime library in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272810#M452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I get data corruption and and an assertion in the destructor for wstring parameters passed across the API when I compile the sample programs or my own product using the non-DLL version of the Runtime Library in Visual Studio 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, if I change the C/C++ Code Generation Runtime Library from Multi-threaded Debug DLL (/MDd) to Multi-threaded Debug (/MTd), the sample program crashes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My own software uses MFC in a Static Library (not a shared DLL) and therefore requires the non-DLL runtime libraries. Many other APIs come with multiple versions to support multiple runtime options. See an example here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.smalleranimals.com/isource.htm#download"&gt;http://www.smalleranimals.com/isource.htm#download&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please release a version of the DLL compiled for the static C runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tested with Windows 8, Visual Studio 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Debug Assertion Failed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Display.exe&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File: ..\self_x86\crt\src\dbgheap.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Line: 1424&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: _pFirstBlock == pHead&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a snippet of code from the Display sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Iterate through the results, populating the results vector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; results.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Row row;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; PointShapeBuffer geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Point* point;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; while (enumRows.Next(row) == S_OK)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wstring cityName;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.GetString(L"CITY_NAME", cityName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// get error when cityName's destructor is called&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 14:56:22 GMT</pubDate>
    <dc:creator>DanFoster</dc:creator>
    <dc:date>2013-05-21T14:56:22Z</dc:date>
    <item>
      <title>FileGDBAPI.dll is not compatible with programs using static C runtime library</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272810#M452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I get data corruption and and an assertion in the destructor for wstring parameters passed across the API when I compile the sample programs or my own product using the non-DLL version of the Runtime Library in Visual Studio 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically, if I change the C/C++ Code Generation Runtime Library from Multi-threaded Debug DLL (/MDd) to Multi-threaded Debug (/MTd), the sample program crashes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My own software uses MFC in a Static Library (not a shared DLL) and therefore requires the non-DLL runtime libraries. Many other APIs come with multiple versions to support multiple runtime options. See an example here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.smalleranimals.com/isource.htm#download"&gt;http://www.smalleranimals.com/isource.htm#download&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please release a version of the DLL compiled for the static C runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tested with Windows 8, Visual Studio 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Debug Assertion Failed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Display.exe&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File: ..\self_x86\crt\src\dbgheap.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Line: 1424&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: _pFirstBlock == pHead&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a snippet of code from the Display sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Iterate through the results, populating the results vector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; results.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Row row;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; PointShapeBuffer geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Point* point;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; while (enumRows.Next(row) == S_OK)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wstring cityName;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.GetString(L"CITY_NAME", cityName);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// get error when cityName's destructor is called&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 14:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272810#M452</guid>
      <dc:creator>DanFoster</dc:creator>
      <dc:date>2013-05-21T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDBAPI.dll is not compatible with programs using static C runtime library</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272811#M453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I prefer to use static libraries as well, but the FGDB API is not released static.&amp;nbsp; It is released&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for VS2008/VS2010/VS2012 on 32-bit/64-bit with Release/Debug (12 different environments).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Adding static/dynamic would make it 24. I just don't see that happening.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 02:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272811#M453</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-05-22T02:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDBAPI.dll is not compatible with programs using static C runtime library</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272812#M454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also experienced crashes in FileGDB API while destructing wstring when I had my code compiled into a static lib.&amp;nbsp; But this was happening only when I was testing my static lib code using Visual Studio C++ unit tests.&amp;nbsp; Everything worked fine when using a console application or a dll linking to static lib.&amp;nbsp; I thought this is a Microsoft bug in C++ unit test framework and ignored the crash.&amp;nbsp; After seeing your post, it seems there is some bug in FileGDB C++ API that we see crashes in wstring destruction.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 03:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272812#M454</guid>
      <dc:creator>ViksitAgarwal</dc:creator>
      <dc:date>2013-05-22T03:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: FileGDBAPI.dll is not compatible with programs using static C runtime library</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272813#M455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Setting the C/C++ Code Generation Runtime Library to Multi-threaded Debug DLL (/MDd) helps in Visual Studio 2012, but when I compiled my code in Visual Studio 2013 Preview and ran it, even that option led to the runtime error mentioned above. So it is probably not only a static linking problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Sep 2013 18:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/filegdbapi-dll-is-not-compatible-with-programs/m-p/272813#M455</guid>
      <dc:creator>WillemLigtendag</dc:creator>
      <dc:date>2013-09-08T18:39:39Z</dc:date>
    </item>
  </channel>
</rss>

