Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Are you actually using <a href="http://msdn.microsoft.com/en-us/library/a90k134d.aspx" rel="nofollow noreferrer"><code>__declspec(dllexport)</code></a>? My guess is no -- without that declaration, that function will not be exported by the DLL (or in other words, programs loading that DLL will not have access to functions without that declaration).</p> <p>Also, try using <a href="http://www.dependencywalker.com/" rel="nofollow noreferrer">Dependency Walker</a> to see exactly which functions your DLL has made available.</p> <hr> <p>The fact that <code>__declspec(dllexport)</code> isn't used in function declarations is okay -- most of the time, it will only be used once in a single header file, like</p> <pre><code>#ifdef MAKING_DLL #define FOO_API __declspec(dllexport) #else #define FOO_API #endif </code></pre> <p>So that if you have <code>#define MAKING_DLL</code> before that section, all functions that are declared like <code>FOO_API int BakeACake()</code> will be exported based on whether <code>MAKING_DLL</code> was defined. It's possible that the project was expecting <code>MAKING_DLL</code> (or its equivalent) to be defined on the command line, depending on the project type built (something like <code>/DMAKING_DLL</code>; or you might even need to define FOO_API yourself like <code>/DFOO_API=__declspec(dllexport)</code>.</p> <p>The empty top right section in Dependency Walker just means your program isn't linking against the DLL's corresponding .lib file. That's okay, it just means you are using <code>LoadLibrary</code> or <code>LoadLibraryEx</code> to access functions in the DLL.</p> <p>Another fairly likely scenario (based on the fact that the mangled names are different) is that the program was built using a different version of Visual Studio than 2008, which you used to build the DLL. Unlike plain C, there's no standard binary interface for C++, which means that you have to use the same compiler to build the program and the DLL when you are using C++ classes in the DLL. If you can, try rebuilding the program in VS2008, or try rebuilding the DLL in the same version of VS as the program was built.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload