gAndy50 / Qb64Wrappers

Wrappers for QB64!
9 stars 0 forks source link

cannot find dynamic library file #1

Closed RetroNick2020 closed 2 years ago

RetroNick2020 commented 2 years ago

Hi Andy,

Trying to get qb64 (various versions) to work with your bindings. I am getting "cannot find dynamic library file" Using Window 10 Pro 64 bit

I have placed all the files in my qb64 folder. .bi .dll

gAndy50 commented 2 years ago

You will need the .bi file and .DLL file in the same folder as your project. I just tested it under Windows 10 64-bit and it works for me.

RetroNick2020 commented 2 years ago

I have done the same and still get the message. Can you verify that you don't have raylib.dll somewhere else.

Can you rename raylib.dll in your project folder and see if your test still works?

On Sun, 31 Jul 2022 at 23:31, Andy @.***> wrote:

You will need the .bi file and .DLL file in the same folder as your project. I just tested it under Windows 10 64-bit and it works for me.

— Reply to this email directly, view it on GitHub https://github.com/gAndy50/Qb64Wrappers/issues/1#issuecomment-1200654673, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANSAEFJS2TRIRTJ2KCGF73DVW5AIBANCNFSM55FW3PPQ . You are receiving this because you authored the thread.Message ID: @.***>

RetroNick2020 commented 2 years ago

just some more info. If i take another raylib.dll (from my ray4laz bindings) and copy into my qb64 project directory I get a different error message.

Sub/Function does not exist in dynamic library (probably because the bindings are not compatible)

So what this tells me is that the raylib.dll that is included in your bindings is ignored/not compatible with my Windows 10 Pro 64bit

it works on your system because you probably have a compatible raylib.dll version for your system in your path somewhere

Or my system is completely messed up.

On Mon, 1 Aug 2022 at 10:30, nick's hardware @.***> wrote:

I have done the same and still get the message. Can you verify that you don't have raylib.dll somewhere else.

Can you rename raylib.dll in your project folder and see if your test still works?

On Sun, 31 Jul 2022 at 23:31, Andy @.***> wrote:

You will need the .bi file and .DLL file in the same folder as your project. I just tested it under Windows 10 64-bit and it works for me.

— Reply to this email directly, view it on GitHub https://github.com/gAndy50/Qb64Wrappers/issues/1#issuecomment-1200654673, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANSAEFJS2TRIRTJ2KCGF73DVW5AIBANCNFSM55FW3PPQ . You are receiving this because you authored the thread.Message ID: @.***>

RetroNick2020 commented 2 years ago

I was able to test on a new Windows 11 64 bit computer with a fresh install of latest qb64 (phoenix edition 64 bit) And I still got the same results.

Can anyone else verify this?

On Sun, 31 Jul 2022 at 23:31, Andy @.***> wrote:

You will need the .bi file and .DLL file in the same folder as your project. I just tested it under Windows 10 64-bit and it works for me.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

gAndy50 commented 2 years ago

I haven't updated these wrappers in awhile. I think for Raylib it is version 2.5 or 3.0. I planned on making a wrapper for Raylib 4.0, but haven't got around to it. Also, yes in my directory, both the .bi and .dll file are in the same folder along with qb64.exe

RetroNick2020 commented 2 years ago

did you try without the raylib.dll in your folder (rename or delete)? I have a feeling it is being accessed from another folder that's why when you test it works.

On Mon, 1 Aug 2022 at 17:07, Andy @.***> wrote:

I haven't updated these wrappers in awhile. I think for Raylib it is version 2.5 or 3.0. I planned on making a wrapper for Raylib 4.0, but haven't got around to it. Also, yes in my directory, both the .bi and .dll file are in the same folder along with qb64.exe

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

gAndy50 commented 2 years ago

Yes the DLL files have to be in the same folder as your project. As stated here: https://github.com/QB64Official/qb64/wiki/DLL-Libraries

The DLL files must be in the QB64.exe folder or in the system-32 folder. Try using Raylib 2.5 or 3.0, as I cannot remember which Raylib I have currently wrapped. I plan on making a wrapper for Raylib 4.0 soon.

RetroNick2020 commented 2 years ago

I had some time to narrow down this problem.

I commented out all the functions that are not used by the example program in raylib.bi

The error messages go away when i do this. and the example program works as expected.

I tested this with the latest raylib.dll in my project folder. no raylib.dll in my system32

so it looks like there is one or more functions in your raylib binding that breaks this.

hope this helps others running into this issue

gAndy50 commented 2 years ago

Yes, I was testing this eariler. There is a function that isn't in the DLL that is being called by the program, but throws a error, because the function isn't in the DLL. I plan on updating the wrapper for Raylib 4.2 very soon.

RetroNick2020 commented 2 years ago

I don't know if this helps you but here is a list of the commands that needed to be commented out

    SUB UnhideWindow ()
    SUB HideWindow ()
    SUB SetTraceLogExit (BYVAL xl AS INTEGER)
    FUNCTION GetExtension& (filename AS STRING)
    FUNCTION GetDirectoryFiles& (path AS STRING, BYVAL count AS INTEGER)
    SUB ClearDirectoryFiles ()
    FUNCTION GetDroppedFiles& (BYVAL count AS INTEGER)
    SUB ClearDroppedFiles ()
    FUNCTION GetFileModTime& (filename AS STRING)
    SUB StorageSaveValue (BYVAL xpos AS INTEGER, BYVAL xval AS INTEGER)
    FUNCTION StorageLoadValue& (BYVAL xpos AS INTEGER)
    SUB OpenURL (url AS STRING)
    FUNCTION IsGamepadName& (BYVAL pad AS INTEGER, title AS STRING)
    FUNCTION GetTouchPointsCount& ()
    FUNCTION LoadImageEx& (BYVAL rColor AS _UNSIGNED LONG, BYVAL w AS INTEGER, BYVAL h AS INTEGER)
    FUNCTION LoadImagePro& (BYVAL dat AS _OFFSET, BYVAL w AS INTEGER, BYVAL h AS INTEGER, BYVAL mat AS INTEGER)
    SUB UnloadRenderTexture (BYVAL RenderTexture2D AS _OFFSET)
    FUNCTION GetImageData& (BYVAL Image AS _OFFSET)
    FUNCTION GetImageDataNormalized& (BYVAL Image AS _OFFSET)
    FUNCTION GetTextureData& (BYVAL Texture2D AS _OFFSET)
    FUNCTION GetScreenData& ()
    FUNCTION ImageExtractPalette& (BYVAL Image AS _OFFSET, BYVAL max AS INTEGER, BYVAL count AS INTEGER)
    FUNCTION GenImagePerlinNoise& (BYVAL w AS INTEGER, BYVAL h AS INTEGER, BYVAL x AS INTEGER, BYVAL y AS INTEGER, BYVAL scale AS _FLOAT)
    SUB DrawTextRec (BYVAL Font AS _OFFSET, text AS STRING, BYVAL Rect AS _FLOAT, size AS _FLOAT, BYVAL space AS _FLOAT, BYVAL wrap AS INTEGER, BYVAL rColor AS _UNSIGNED LONG)
    SUB DrawTextRecEx (BYVAL Font AS _OFFSET, text AS STRING, BYVAL Rect AS _FLOAT, BYVAL size AS _FLOAT, BYVAL space AS _FLOAT, BYVAL wrap AS INTEGER, BYVAL rColor AS _UNSIGNED LONG, BYVAL sel AS INTEGER, BYVAL xlen AS INTEGER, BYVAL rColor AS _UNSIGNED LONG, BYVAL rColor AS _UNSIGNED LONG)
    FUNCTION GetNextCodepoint& (text AS STRING, BYVAL count AS INTEGER)
    FUNCTION TextCountCodepoints& (text AS STRING)
    SUB DrawGizmo (BYVAL Vector3 AS _FLOAT)
    FUNCTION LoadMeshes& (filename AS STRING, BYVAL count AS INTEGER)
    FUNCTION MeshBoundingBox& (BYVAL Mesh AS _OFFSET)
    SUB MeshTangents (BYVAL Mesh AS _OFFSET)
    SUB MeshBinormals (BYVAL Mesh AS _OFFSET)
    FUNCTION CheckCollisionRaySphere& (BYVAL ray AS _OFFSET, BYVAL Vector3 AS _FLOAT, BYVAL rad AS _FLOAT)
    FUNCTION CheckCollisionSphereEx& (BYVAL ray AS _OFFSET, BYVAL Vector3 AS _FLOAT, BYVAL rad AS _FLOAT, BYVAL Vector3 AS _FLOAT)
    FUNCTION CheckCollisionRayBox& (BYVAL ray AS _OFFSET, BYVAL bb AS _OFFSET)
    FUNCTION GetCollisionRayModel& (BYVAL ray AS _OFFSET, BYVAL Model AS _OFFSET)
    FUNCTION GetCollisionRayTriangle& (BYVAL ray AS _OFFSET, BYVAL Vector3 AS _FLOAT, BYVAL Vector3 AS _FLOAT, BYVAL Vector3 AS _FLOAT)
    FUNCTION GetCollisionRayGround& (BYVAL ray AS _OFFSET, BYVAL gh AS _FLOAT)
    FUNCTION LoadText& (filename AS STRING)
    FUNCTION LoadShaderCode& (vs AS STRING, fs AS STRING)
    FUNCTION GetShaderDefault& ()
    FUNCTION GetTextureDefault& ()
    SUB SetMatrixProjection (BYVAL Matrix AS _OFFSET)
    SUB SetMatrixModelview (BYVAL Matrix AS _OFFSET)
    FUNCTION GetMatrixModelview& ()
    FUNCTION GenTextureCubemap& (BYVAL Shader AS _OFFSET, BYVAL Texture2D AS _OFFSET, BYVAL size AS INTEGER)
    FUNCTION GenTextureIrradiance& (BYVAL Shader AS _OFFSET, BYVAL Texture2D AS _OFFSET, BYVAL size AS INTEGER)
    FUNCTION GenTexturePrefilter& (BYVAL Shader AS _OFFSET, BYVAL Texture2D AS _OFFSET, BYVAL size AS INTEGER)
    FUNCTION GenTextureBRDF (BYVAL Shader AS _OFFSET, BYVAL size AS INTEGER)
    SUB InitVrSimulator ()
    SUB CloseVrSimulator ()
    SUB UpdateVrTracking (BYVAL Camera AS _OFFSET)
    SUB SetVrConfiguration (BYVAL VrDeviceInfo AS _OFFSET, BYVAL Shader AS _OFFSET)
    FUNCTION IsVrSimulatorReady& ()
    SUB ToggleVrMode ()
    SUB BeginVrDrawing ()
    SUB EndVrDrawing ()
    FUNCTION LoadWaveEx& (BYVAL dat AS _OFFSET, BYVAL samp AS INTEGER, BYVAL rate AS INTEGER, BYVAL size AS INTEGER, BYVAL chan AS INTEGER)
gAndy50 commented 2 years ago

Thanks for bringing it to my attention. I'm currently working a wrapper for Raylib 4.2, I'm also testing it as well. So far things are coming along nicely. I hope to have it up within a few days or so.

RetroNick2020 commented 1 year ago

I will keep an eye out for the update. I've placed the dll everywhere with every version I have. I even did this on a new notebook with basically nothing installed except qb64 and raylib dll and bindings

On Wed, 3 Aug 2022 at 22:04, Andy @.***> wrote:

Yes the DLL files have to be in the same folder as your project. As stated here: https://github.com/QB64Official/qb64/wiki/DLL-Libraries

The DLL files must be in the QB64.exe folder or in the system-32 folder. Try using Raylib 2.5 or 3.0, as I cannot remember which Raylib I have currently wrapped. I plan on making a wrapper for Raylib 4.0 soon.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>