dll not loading [message #42578] |
Tue, 15 February 2005 10:12  |
R.G.Stockwell
Messages: 163 Registered: October 2004
|
Senior Member |
|
|
A colleague reported an odd error with IDL code that calls
Oleg Kornilov and Ronn Kling's avi dll, and I was able to reproduce it
(win xp sp2, idl 6.1)
I am probably missing something obvious, but what else is new :)
Depending on how I start IDL, I either 1) find the dll functions,
everything ok
or 2) can't find dll functions, and get syntax errors.
1) If I click on the program aviKRtest.pro, so it loads into IDL
automatically, I can compile it with no errors, everthing is fine.
2) just start IDL with no programs loaded, then type
IDL> .comp aviKRtest
I get syntax errors:
aviParams =
avi_openw('c:\avi\testwrite.avi',24L,300L,400L,frameRate=2,o ptions=1)
% Syntax error.
So IDL did not find the dll, and thinks that the avi functions are arrays,
hence
it reports a syntax error.
It does find aviKRtest and opens it in the ide.
The dll is in the same directory as aviKRtest.pro, which is in the path.
I've used routines with dlls a bunch of times and have not run into this
before.
In fact I run this code fairly often, but I guess I use method 1 above and
have
not noticed that there could be any problems.
I do use a sav routine for a widget that calls the above avi and it works
great.
As is the rule of this newgroup, it is necessary for me to actually send
this
message before I realize the simple obvious bozo the clown mistake I am
making. :)
But feel free to post a response anyway.
Cheers,
bob
The short code showing this behaviour is:
pro aviKRtest_junk,red, green, blue
roseImage = dist(500,500)
nFrames = 10
aviParams =
avi_openw('c:\avi\testwrite.avi',24L,300L,400L,frameRate=2,o ptions=1)
for i=0,nFrames-1 DO BEGIN
status = avi_put( aviParams, i, shift(roseImage,0,i*10,i*10))
tv,shift(roseImage,0,i*10,i*10),/true
endfor
status = avi_closew(aviParams)
return
end
|
|
|