Re: Call_external [message #38499 is a reply to message #1268] |
Wed, 10 March 2004 11:02   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
It doesn't look like he's finding the compiler.
When you use the Visual Studio, the Studio finds and invokes the compiler
for you. Outside the Studio, the compiler, linker, and other tools are not
in your PATH, and so cannot be found if you try to invoke them from the
command line or from IDL.
Look for a VSVARS32.BAT or a VCVARS32.BAT file in your directory where you
installed Visual Studio. These BAT files modify/set the env vars PATH,
INCLUDE, and LIB, which allows you to invoke the compiler tools from the
command line. In order to use the compiler tools from IDL, you need to
modify/set these environment variables using the System applet in the
Windows Control Panel. The BAT file contains the values you need to set the
env vars.
Karl
"Haje Korth" <haje.korth@jhuapl.edu> wrote in message
news:c2nipj$ol2$1@aplcore.jhuapl.edu...
> Paul,
> the first thing you have to understand is that call_external is an
advanced
> subject. Thus you will have to spend some time on the subject. It seems
you
> are trying to auto-create the dll. To me this is even more advanced. Start
> simple: Take sum_array.c and compile it as dll. You need the switches -dll
> and -def:sum_array.def, where sum_array.def is the module definition file
> which contains your export. Study the compiler instruction on how to
create
> the .def file. It will not work without it! Stick to the portable calling
> convention (if you actually open the .c file and read the information in
the
> file you will understand what I mean). Once you create the dll, you can
use
> sum_array.pro to test it. By using the method above you can separate
> problems in execution from problems in creating the dll. I never use
> autoglue, but from your errors below I am wondering whether IDL finds your
> compiler at all???
>
> Haje
>
>
> "Dr Paul Ducksbury" <p.ducksbury@signal.qinetiq.com> wrote in message
> news:1078929414.412397@bengal...
>> Thanks for that it looks easier than MS description of building
shareable
>> objects and def files. Only one small problem i'm having now is that
>> all_callext_examples fails as it was unable to find some files. I assume
> its
>> some problem so obvious its hitting me in the face, just cant see it.
>>
>> Anyone any ideas ?
>>
>> thanks
>>
>> IDL> all_callext_examples
>> % Compiled module: ALL_CALLEXT_EXAMPLES.
>> % Compiled module: SIMPLE_VARS.
>> Calling simple_vars with the following arguments:
>> B_L BYTE = 2
>> I_L INT = 3
>> L_L LONG = 4
>> F_L FLOAT = 5.00000
>> D_L DOUBLE = 6.0000000
>> % Compiled module: GET_CALLEXT_EXLIB.
>> The name specified is not recognized as an
>> internal or external command, operable program or batch file.
>> cl -D_DLL -DWIN32 -D_MT /nologo /I"E:\RSI\IDL60\external\include" /c
>> "E:\RSI\IDL60\external\call_external\C\incr_struct.c"
>> /Fo"incr_struct_166_PDPC.obj"
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\call_
>> external_examples_166_PDPC.exp
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\call_
>> external_examples_166_PDPC.lib
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\incr_
>> struct_166_PDPC.obj
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\simpl
>> e_vars_166_PDPC.obj
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\strin
>> g_array_166_PDPC.obj
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\sum_a
>> rray_166_PDPC.obj
>> Could Not Find
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\sum_2
>> d_array_166_PDPC.obj
>> % CALL_EXTERNAL: Error loading sharable executable.
>> Symbol: simple_vars, File =
>>
>
C:\WINNT\Profiles\ducksbury\.idl\idl_6_0_Win32_x86_m32_f64\c ompile_dir\call_
>> external_examples.dll
>> ERROR_MOD_NOT_FOUND
>> % Error occurred at: SIMPLE_VARS 91
>> E:\RSI\IDL60\external\call_external\C\simple_vars.pro
>> % ALL_CALLEXT_EXAMPLES 58
>> E:\RSI\IDL60\external\call_external\C\all_callext_examples.p ro
>> % $MAIN$
>> % Execution halted at: ALL_CALLEXT_EXAMPLES 58
>> E:\RSI\IDL60\external\call_external\C\all_callext_examples.p ro
>>
>> "Haje Korth" <haje.korth@jhuapl.edu> wrote in message
>> news:c2n469$63v$1@aplcore.jhuapl.edu...
>>> Paul,
>>> Checkout the examples in the RSI\IDL60\external directory. They are
> pretty
>>> self-explanatory and are probably as descriptive as it will ever be.
The
>>> only book on external routines that I know of, was published by Ronn
> Kling
>>> and specializes on DLMs. While DLM are extremely nice to handle within
>> IDL.
>>> They are not the easiest to implement.
>>>
>>> Cheers,
>>> Haje
>>>
>>>
>>>
>>> "Dr Paul Ducksbury" <p.ducksbury@signal.qinetiq.com> wrote in message
>>> news:1078919071.346356@bengal...
>>>> Is there a simple guide to using call_external ? as i dont have the
>>> external
>>>> develpoment manual that the help page suggests.
>>>>
>>>> Im using IDL 6.0 on PC (windows) with visual c++ 6.0
>>>>
>>>> thanks
>>>>
>>>> Paul
>>>>
>>
>>
>>
>
>
|
|
|