X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 08 Mar 2018 04:47 PM by  David Starbuck
dlm-dll combination that did work, now does not.
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

David Short



New Member


Posts:1
New Member


--
06 Feb 2018 03:25 PM
    I built a dlm-dll combination. I actually built two such combinations. The one that had the interesting stuff I wanted to do and testmodule which is the sample found in the documentation that uses testfun and testpro. Everything worked.

    Two months later I bring it out of version control to insert it into a new branch. Since then I have altered some of the support code (new cuda version)that the dll uses. I recompile and place the dlm-dll where they should go and....it doesn't work. Error loading the dll. The specified procedure could not be found. That seems odd. Working backwards I cannot get what did work two months ago to work at all. I go back to testmodule stripped directly from old version control and...that won't work either. What have I done?

    IDL> DLM_LOAD, 'the correct directory\testmodule.dlm'
    % Dynamically loadable module TESTMODULE redefines existing routine TESTFUN on line 9 of module definition file: "the correct directory"\testmodule.dlm.
    % Dynamically loadable module TESTMODULE redefines existing routine TESTPRO on line 10 of module definition file: "the correct directory"\testmodule.dlm.
    % DLM_LOAD: Error loading sharable executable.
    Symbol: IDL_Load, File = "the correct directory"\testmodule.dll

    doing a dir on "the correct directory" shows both testmodule.dlm (which it clearly seems to read) and testmodule.dll which it doesn't seem to be able to find.

    the dlm reads....
    MODULE testmodule
    DESCRIPTION Test code for loadable modules
    VERSION 1.0

    SOURCE Exelis VIS

    BUILD_DATE JAN 8 1998

    FUNCTION TESTFUN 0 IDL_MAXPARAMS
    PROCEDURE TESTPRO 0 IDL_MAX_ARRAY_DIM

    and the dll is similarly pulled from the documentation.

    It worked two months ago. I'm puzzled. What did work, now doesn't work, even though the references seem to point to the correct place. I'm overlooking something, but what?


    David Short



    New Member


    Posts:1
    New Member


    --
    07 Feb 2018 03:22 PM
    Just to add on.

    HELP,,DLM
    ...
    ** TESTMODULE - Test code for loadable modules (not loaded)
    Version: 1.0, Build Date: JAN 8 1998, Source: Exelis VIS
    Path: C:\Users\,,,\testmodule.dll
    ...
    Means the dlm has loaded and is pointing at the correct dll.

    IDL> TESTFUN()
    % TESTFUN: Error loading sharable executable.
    Symbol: IDL_Load, File = C:\...\testmodule.dll
    The specified procedure could not be found.
    % Execution halted at: $MAIN$
    It's not clear to me if the error was that the dll is not loading, or if the dll is loading but can't find testfun. Either way it appears to be pointing at the correct...well intended dll.

    The os says I do have read access to the dll.
    I compiled TestModule and it worked in November.
    My OS and version of IDL are still 64 bits.
    Filenames are in lowercase.

    ?? I"ve overlooked something. I just don't see what.

    David Starbuck



    Basic Member


    Posts:143
    Basic Member


    --
    08 Mar 2018 04:47 PM
    Have you recompiled your DLM since you started encountering this issue. I wondering if the IDL_Load function wasn't properly linked with the DLM. When I created a DLM on Mac OS X in the past, I compiled it using commands similar to the following:

    gcc -fPIC -fno-common -D_RENTRANT -c myFunc.c
    gcc -fPIC -fno-common -D_RENTRANT -c IDL_Load.c
    gcc -dynamiclib -dylib -flat_namespace -undefined suppress -o myFunc.so myFunc.o IDL_Load.o

    David
    -HGS
    You are not authorized to post a reply.