Is it possible to embed the libmysql40.dll in an exe using Delphi 5?
When I create a program is seems to require this dll even though my database is MySQl 3.23.
Most of the host PC's have libmysql.dll loaded but the program requires libmysql40.dll... is this changeable?
Regards...
MySQL and DLL's
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 3
- Joined: 21.10.2005, 16:13
- Location: UK
- Contact:
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Are you sure the protocol of the Connection component is set to mysql323 at the moment you open the connection? (If you connect using code : debug point on the open command or active:=true line)
If that's alright and it requires 40.dll there's something wrong. What zeos version are you using?
You can try to modify Zeos.inc in the sources directory by commenting out strict dll_loading:
This has the risk that a wrong Dll is loaded when the host PC has a different default dll. (eg mysql 5.1 instead of 4.0)
Mark
If that's alright and it requires 40.dll there's something wrong. What zeos version are you using?
You can try to modify Zeos.inc in the sources directory by commenting out strict dll_loading:
Code: Select all
// Prevents loading default libmysql.dll
{.$DEFINE MYSQL_STRICT_DLL_LOADING}
Mark
-
- Fresh Boarder
- Posts: 3
- Joined: 21.10.2005, 16:13
- Location: UK
- Contact:
MySQL and DLL's
It is currently set to just mysql rather than one of the version specific MySql options. I assumed this would use the default dll rather than pick a version specific one like libmysql40.dll.
I will change this to mysql323 and see if it cures the problem, however I would still like to know if it is possible to embed the dll into the exe and save the hassle on any other non mysql 3.23 hosts.
Thanks for the quick reply.
I will change this to mysql323 and see if it cures the problem, however I would still like to know if it is possible to embed the dll into the exe and save the hassle on any other non mysql 3.23 hosts.
Thanks for the quick reply.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
I hope it will work using mysql323.
I started a little 'to look at later' list, some minutes ago. I think it would be nice to check the actual library version in case someone just says 'mysql'. Depending on the result we could just swap to the right internal ZEOS driver. It will probably not be for this release, I think.
Concerning the embedding of the DLL, are you sure that's a good idea? If you manage to do so, you can disable all other databases (except for mysql, of course) by editing ZEOS.inc. That way you don't include code for other drivers.
I'm not an expert in this issues, but make sure it's legal to include the mysql library in your exe.
Mark
I hope it will work using mysql323.
I started a little 'to look at later' list, some minutes ago. I think it would be nice to check the actual library version in case someone just says 'mysql'. Depending on the result we could just swap to the right internal ZEOS driver. It will probably not be for this release, I think.
Concerning the embedding of the DLL, are you sure that's a good idea? If you manage to do so, you can disable all other databases (except for mysql, of course) by editing ZEOS.inc. That way you don't include code for other drivers.
I'm not an expert in this issues, but make sure it's legal to include the mysql library in your exe.
Mark