I do not have VS 2008 on my system, but I have got this program to work using VS 2010 with IDL 8.1. Below, I provided a few notes on what I did to get it to work:
1) I created a new project as a Win32 application. I added the "IDL_Load.c", "simpleExample.c" and "simpleExample.h" to the project file.
2) I right clicked on the project and selected "Properties". Under C/C++ > General, I added "C:\Program Files\ITT\IDL|IDL81\external" to "Additional Include Directories".
3) In the Properties dialog, I select Linker > Command Line and added "/EXPORT:IDL_Load" to the "Additional Options" box.
4) I built the project then put the dll,lib,dlm,ilk,lib,def,exp and pdb to my home directory. I started IDL and ran the command:
IDL> print,simpleFunction()
% Loaded DLM: SIMPLEEXAMPLE.
% SIMPLEFUNCTION: simpleFunction Called
0
I also wonder if this error might be occurring because your environment is not set up to use the Visual Studio 2008 dependencies. Perhaps, you could try starting IDL and running simpleProcedure from a Visual Studio 2008 command prompt. To start a Visual Studio 2008 command prompt, you can go to Start > All Programs > Microsoft Visual Studio 2008 > Command Prompt. You can then start IDL by using the 'idl.exe' executable in the bin.x86 or bin.x86_64 directory in the IDL installation.
NOTE: I also want to mention is that IDL 7.1 is built using MS Visual Studio 2005. There could be issues using libraries or COM objects built using a different version of visual studio.
|