Re: ABOUT DLL WITH VC++ IN IDL. HELP! [message #11691] |
Sat, 09 May 1998 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
Hi,
> I have VC++5.0, I used it to create .dll files, but every time I ran
> idl call_external, it crashes. It seems IDL only call direct C instead of
> C++.
I am not sure what you mean by this. You can definitely use the VC++5.0
compiler, but the code which IDL calls directly must be C, not C++. However,
you can just write a thin wrapper layer in C (which you normally need to write
anyway because of the way IDL passes parameters), and your C wrapper can call
C++ functions. I have done this successfully.
I will repeat the recommendation in my last post, try to build the example in
the IDL external directory.
I just did this under IDL 5.0, Windows NT 4.0, VC++ 5.0
I simply typed the following commands:
# This command puts the VC++ programs in your path
c:"\program files\devstudio\vc\bin\vcvars32.bat"
c: # Go to c:
cd rsi\idl50\external\sharelib # Go to IDL example directory
del dlltst32.dll # Delete the RSI provided dll
copy makefile.win makefile # Copy the example makefile
nmake # Run make to compile and link
Now run the dll in IDL
IDL> cd, 'external\sharelib'
IDL> dlltst32
This worked fine for me.
____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)
or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)
|
|
|