On 4/14/06, <b class="gmail_sendername">Ben Larson</b> &lt;<a href="mailto:blarson@optomet.com">blarson@optomet.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I'm using CMake to manage the build process for a DLL I've created<br>mostly from ITK. I have successfully accessed the DLL with a C++ app but<br>now want to export the functions using standard calling conventions so I
<br>can call the DLL from a Visual Basic app. I've got __stdcall in front of<br>all of my functions but Visual Studio 6 doesn't seem to be exporting<br>them correctly. Configuring a project entirely within VS 6 exports fine
<br>with __stdcall but the projects with CMake are not. I'm sure I'm missing<br>something here. I'm wondering if there are some settings I need to set<br>in the CMakeLists.txt file to make sure I'm creating DLLs that are<br>
exporting functions with standard calling conventions.</blockquote><div>&nbsp;<br>Maybe it is not a CMake issue at all.&nbsp; Here are a couple of things I would check:<br>1. Use extern &quot;C&quot; on the functions you want to export
<br>2. Create an appropriate .def file and add it to your project<br><br>Phillip Hellewell<br></div></div>