Author Topic: Cannot find dynamic library file  (Read 6637 times)

0 Members and 1 Guest are viewing this topic.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Cannot find dynamic library file
« Reply #15 on: December 06, 2020, 10:58:41 pm »
Have you tried the .\ yet?
Shuwatch!

Offline Paolo_Ricardo

  • Newbie
  • Posts: 18
    • View Profile
Re: Cannot find dynamic library file
« Reply #16 on: December 06, 2020, 11:11:53 pm »
No, because the .dlls are in the program folder and not with the source - which is why I used the absolute paths.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Cannot find dynamic library file
« Reply #17 on: December 06, 2020, 11:14:10 pm »
I guess just keep trying to fiddle with it until it clicks. I am not sure what is wrong with it.
Shuwatch!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Cannot find dynamic library file
« Reply #18 on: December 06, 2020, 11:31:34 pm »
Doesn’t the IDE normally give a file not found type error, if it can’t find the library?  Is there a problem with the EXE not being in the same folder as the bas file?  Or a permission issue?  The picture shows OK in the IDE, so it seems to me that QB64 is finding the dll okay. 
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Paolo_Ricardo

  • Newbie
  • Posts: 18
    • View Profile
Re: Cannot find dynamic library file
« Reply #19 on: December 06, 2020, 11:38:18 pm »
I put the .dlls in the source directory and used the .\ option. At least I get the same result now - a window opening and closing. No message about missing .dll for the 64 bit version.

The message that shows up briefly is, I think,  "MYSQL Client: " + mysql_get_client_info$ . It's a very short message.

Does this have anything to do with nothing else happening? As far as I'm aware I'm not connected to any database.

PRINT mysql_real_connect(conn, "qb64db2.db.7445102.hostedresource.com", "qb64guest", "QB64forever", "qb64db2", 0, 0, 0)


Offline Paolo_Ricardo

  • Newbie
  • Posts: 18
    • View Profile
Re: Cannot find dynamic library file
« Reply #20 on: December 06, 2020, 11:42:06 pm »
@SMcNeill

It was giving a 'missing .dll' message for the 64-bit version but that seems to have disappeared. The compiled programs are in a work folder. I have now put the .dlls in the work folder. The .BAS and .EXE files are in the same folder.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Cannot find dynamic library file
« Reply #21 on: December 07, 2020, 06:47:43 am »
It could just be crashing since you don't have a database connection (The demo may not fail gracefully AND that server is more than likely not available anymore. I don't remember ever being able to use it in the past.). If you see anything from that client info function then the DLLs are working. The main thing is.... The DLLs should be kept with the compiled executable and the source should usually be a ".\" so that when you distribute it you don't get the message about not finding the DLL. The helper file doesn't need to be distributed (unless you are distributing the source, and I don't think it's even needed for anything other than the SQL Client demo) after you compile because it is then a part of the main executable.
« Last Edit: December 07, 2020, 11:43:51 am by SpriggsySpriggs »
Shuwatch!

Offline Paolo_Ricardo

  • Newbie
  • Posts: 18
    • View Profile
Re: Cannot find dynamic library file
« Reply #22 on: December 07, 2020, 06:11:42 pm »
@SpriggsySpriggs

So ''mysql_real_connect(conn, "qb64db2.db.7445102.hostedresource.com", "qb64guest", "QB64forever", "qb64db2", 0, 0, 0)'' is no longer available - and that was the reason for  the problems?

OK, so, apart from the non-functioning SQL Client code, are there any tutorials available on integrating QB64 with MySQL?

Would I be correct in assuming that MYSQL.BM and MYSQL.BI provide a full implementation of MySQL's declarations/functions/subs?

I am quite determined to learn QB64 and MySQL so thanks for your help so far and for any further information.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Cannot find dynamic library file
« Reply #23 on: December 07, 2020, 06:22:27 pm »
It isn't that the demo is non-functioning. It's that the server that was used in the demo is no longer available. Just make a localhost server in MySQL Workbench and do your testing there. That's what I do.

My MYSQL.BI and MYSQL.BM do not provide full implementation but I do occasionally check the MySQL C API pages to see what new function can be added. I think that all the useful ones are there right now (A lot of functions that aren't implemented yet can be replicated by simply doing a query rather than a DLL call). If you ever need help with figuring out how to use some of the functions then don't hesitate to either add a new reply to this post or send me a PM. I do still have plans on making a dedicated post and video on how to do the entire MySQL setup. All the way from getting MySQL Workbench to running code with super complex queries.
Shuwatch!

Offline Paolo_Ricardo

  • Newbie
  • Posts: 18
    • View Profile
Re: Cannot find dynamic library file
« Reply #24 on: December 07, 2020, 06:26:18 pm »
@SpriggsySpriggs

OK, thanks.