comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » dll not loading
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
dll not loading [message #42578] Tue, 15 February 2005 10:12 Go to next message
R.G.Stockwell is currently offline  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
Re: dll not loading [message #42620 is a reply to message #42578] Thu, 17 February 2005 08:22 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"Rick Towler" <rtowler@nomail.gmail.com> wrote in message
news:w76dnSTJhqgCrYnfRVn-iw@comcast.com...
> R.G.Stockwell wrote:
...
>> Kinda weird how loading the file when IDL opens gets
>> around that though.
>
> You have IDLDE set to "change directory on open" and IDL searches the
> local directory, then the DLM_PATH for your .dlm.
>
> So if you open your file up in IDLDE, the local directory is changed to
> the directory containing your .dlm and IDL finds it. If you compile your
> file from the command line your local directory is unchanged and IDL can't
> find your .dlm.
>
> -Rick

Hi Rick,
that does not seem to explain the behaviour. I do not have
"change directory on open" set, and the current directory is
not set to the directory where the file is located.
Below, the current directory is h:\idllib\boblib\cora\gswm
while the DLM is in h:\idllib\boblib\cora\animation_avi\
(where I clicked on the file in filemanafer, causing IDL to open, and it
does
find the DLM).

I do agree though that IDLDE is different when the file is
called when idl opens, and it does look in that initial directory.

The odd thing is that for years I have used DLLs, and I have
thought that it would look in the program file's directory
for the dll. I have never had to modify the dlm_path.
I guess I almost always start IDL by opening the file from
the file manager. I guess it is just one of those quirks that I
have assumed was a rule.

Here is a session start (from file manager) where the DLM is found.
Version 6.1.1, Microsoft Windows (Win32 x86 m32). (c) 2004, Research
Systems, Inc.

IDL> pwd

% Compiled module: PWD.

h:\idllib\boblib\cora\gswm

IDL> .COMPILE "h:\idllib\boblib\cora\animation_avi\aviKRtest.pro"

% Compiled module: AVIKRTEST.



So anyways, thanks to the group for pointing out the correct way
to find dlls (i.e. create a MyDLLs folder and point !DLM_PATH to it)


Cheers,
bob
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: trajectory plot behind sphere
Next Topic: IDLgrVolume, PickVoxel, HELP!!!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:05:58 PDT 2025

Total time taken to generate the page: 0.00530 seconds