Menu

COB_PRE_LOAD and COB_LIBRARY_PATH all the printouts not able to load dll

J McNamara
2025-01-01
2025-01-01
  • J McNamara

    J McNamara - 2025-01-01

    hI i am trying to set the following:

    export COB_PRELOAD_PATH-c:/msys64/mingw64/bin/ptr.dll
    export COB_PRE_LOAD=c:/msy64/mingw64/bin

    cobcrun -r

    $ ./dialog.exe
    libcob: warning: preloading of 'c:/msys64/mingw64/bin/ptr.dll' failed
    Text Area Added to Dialog1
    ARRIVED
    Call "subc" with normal COBOL data
    Arg1=Arg1 ,Arg2=Arg2 ,Arg3=+0031415926
    libcob: error: module 'subc' not found
    cobcrun -r
    libcob: warning: preloading of 'c:/msys64/mingw64/bin/ptr.dll' failed
    GnuCOBOL 3.2.0 runtime configuration
    via C:/msys64/mingw64/share/gnucobol/config\runtime.cfg

    CALL configuration
    : COB_LOAD_CASE : not set
    : COB_PHYSICAL_CANCEL : no (default)
    env: COB_LIBRARY_PATH : c:/msys64/mingw64/bin
    env: COB_PRE_LOAD : c:/msys64/mingw64/bin/ptr.dll
    eval: COB_PRE_LOAD : not set

    File I/O configuration
    : COB_UNIX_LF : no (default)
    : COB_FILE_PATH : not set
    : COB_VARSEQ_FORMAT : 0 (default)
    : COB_LS_FIXED : no (default)
    : COB_LS_VALIDATE : yes (default)
    : COB_LS_NULLS : no (default)
    : COB_LS_SPLIT : yes (default)
    : COB_SEQ_CONCAT_NAME : no (default)
    : COB_SEQ_CONCAT_SEP : + (default)
    : COB_SORT_CHUNK : 256K (default)
    : COB_SORT_MEMORY : 128M (default)
    : COB_SYNC : no (default)
    : DB_HOME : not set
    : COB_COL_JUST_LRC : yes (default)

    Screen I/O configuration
    : COB_BELL : BEEP (default)
    : COB_REDIRECT_DISPLAY : no (default)
    : COB_SCREEN_ESC : no (default)
    : COB_SCREEN_EXCEPTIONS : no (default)
    : COB_TIMEOUT_SCALE : 0 (default)
    : COB_INSERT_MODE : no (default)
    : COB_MOUSE_FLAGS : 1 (default)
    : COB_MOUSE_INTERVAL : 100 (default)
    : COB_DISPLAY_PRINT_PIPE : not set
    : COB_DISPLAY_PRINT_FILE : not set
    : COB_DISPLAY_PUNCH_FILE : not set
    : COB_LEGACY : no (default)
    : COB_EXIT_WAIT : yes (default)
    : COB_EXIT_MSG : 'end of program, please press a key to exit' (default)

    Miscellaneous
    : COB_DISABLE_WARNINGS : no (default)
    : COB_ENV_MANGLE : no (default)
    : COB_SET_DEBUG : no (default)
    : COB_SET_TRACE : no (default)
    : COB_TRACE_FILE : not set
    : COB_TRACE_FORMAT : %P %S Line: %L (default)
    : COB_STACKTRACE : yes (default)
    : COB_CORE_ON_ERROR : 0 (default)
    : COB_CORE_FILENAME : ./core.libcob (default)
    : COB_DUMP_FILE : not set
    : COB_DUMP_WIDTH : 100 (default)
    : COB_CURRENT_DATE : not set

    System configuration
    env: USERNAME : 'stealth_droid'
    : LANG : not set
    : OSTYPE : not set
    env: TERM : 'xterm'
    : LOCALEDIR : D:/a/msys64/mingw64/share/locale
    : LC_CTYPE : C
    : LC_NUMERIC : C
    : LC_COLLATE : English_United States.1252
    : LC_MESSAGES : en_US
    : LC_MONETARY : English_United States.1252
    : LC_TIME : English_United States.1252

    I am about at wits end on this one.

    I set both the system path and the user path to point to c:/msys64/msys64/bin in windows env settings.

    I use these to compile ...
    g++ -shared -o myptr.dll testabc.c -Wl,--out-implib,myptr.lib
    RESET
    cd ~/cobjapi-SWING/examples_simple
    pwd

    Try to remove dialog.o, if it exists

    if [ -f "dialog.o" ]; then
    rm dialog.o
    if [ $? -ne 0 ]; then
    echo "Failed to remove dialog.o, but continuing script."
    fi
    else
    echo "dialog.o does not exist, skipping removal."
    fi

    Try to remove dialog.o, if it exists

    if [ -f "dialog.cbsql" ]; then
    rm dialog.cbsql
    if [ $? -ne 0 ]; then
    echo "Failed to remove dialog.o, but continuing script."
    fi
    else
    echo "dialog.o does not exist, skipping removal."
    fi
    echo 'gixpp'
    gixpp -e -S -i dialog.cbl -o dialog.cbsql
    echo 'gixsql'
    gixsql dialog.cbl dialog.cbsql -S -I.
    echo 'cobc'
    cobc -x -v -fixed dialog.cbsql cobjapi.o japilib.o imageio.o fileselect.o \
    -I. -L"c:\msys64\mingw64\bin" -L"c:\msys64\mingw64\lib" -L"c:\msys64\opt\gixsql\lib" -L. -lws2_32 \
    -ljapi \
    -lgixsql \
    -lstdc++ \
    -lcob \
    -lmyptr

    also i put the dll in c:/msys64/mingw64/bin

    any CLUE what is making this go whacko?

    A BIG THANKS,
    jim

    Sent with Proton Mail secure email.

     
    • Simon Sobisch

      Simon Sobisch - 2025-01-01

      The path goes to COB_LIBRARY_PATH and COB_PRE_LOAD has only the name, here ptr (no path, no file extension).

       
      • J McNamara

        J McNamara - 2025-01-01

        Okay Simon,

        You fixed it again. Hooray!

        I am just going to take notes this A.M. and put them in the cherry tree note taking APP.

        Thanks for the cool help.

        Now, I can read some more Ron Norman docs and play with pointers.

        thanks :-)

        jim

         
      • Ralph Linkletter

        I do not know if it matters but there is a - (minus sign) instead of = (equal)
        export COB_PRELOAD_PATH-c:/msys64/mingw64/bin/ptr.dll

         
        • J McNamara

          J McNamara - 2025-01-01

          sorry Ralph,
          I missed the minus when i typed because my vision is not the greatest.

          Simon solved it when he told me to use the dll name without the file-path.

          It worked immediately after I found that out.

          Thank you for pointing that out because that could have been the piece that solved it.
          I am going to spend some more time reading Ron Norman's cobol calling C guide etc.
          because that is just too cool to pass up.

          I'm not very good at it yet but am just starting to try.

          Maybe I will screen magnify my email before sending and I have to when putting code down remember text only too.

          thanks,
          jim

          Sent with Proton Mail secure email.

          On Wednesday, January 1st, 2025 at 2:14 PM, Ralph Linkletter zosralph@users.sourceforge.net wrote:

          I do not know if it matters but there is a - (minus sign) instead of = (equal)
          export COB_PRELOAD_PATH-c:/msys64/mingw64/bin/ptr.dll


          COB_PRE_LOAD and COB_LIBRARY_PATH all the printouts not able to load dll


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           

Anonymous
Anonymous

Add attachments
Cancel