germax Messages: 20 Registered: March 2017 Location: germany
So, just as I expected
for those of you that have the exact same Problem..
the mysql - lib folder is missing a file libmysql.a
that you must create yourself I'm afraid
(dl'ed files off the internet won't work well, since they must exactly match the mysql version installed)
Fear not it's not difficult at all:
five simple steps:
Copy your libmysql.dll to your MinGW bin directory
Open a console at said directory
Run pexports libmysql.dll > libmysql.def *
Run dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a *
Copy libmysql.a back to your mysql server's lib folder *
You are done..
except for when you're encountered issues on the way
first: upp's mingw (at least mine) is not coming with pexports,
you can grab a MinGW standalone off sourceforge and use that instead,
or you could use dlltool itself to create the def file (hopefully to your likings )
like so: dlltool --export-all-symbols --dllname libmysql.dll --output-def libmysql.def
or if you have an older minGW laying around that came with MinGW utils reimp or you're able to trace that down
just use that on the libmysql.lib file (not the dll ) reimp -d libmysql.lib
Now that you got this, the next thing you might trip is making a non-zero sized libmysql.a file
I know I did.
Check your windows environment variables (path to be exact)
if you're like me it's not too short at all..
inspect it thoroughly!
Make sure your mingw-bin path is in there,
AND make sure no interfering path is listed before that (in my case it was an old symbian tool chain (CSL ARM)))
if in doubt check all listed paths for mingw files.. and remove them for now (or permanently.. it's up to you)
when your path variable is cleaned try again creating the libmysql.a file.
once the libmysql.a is of non zero size you can go on an use that
The last step (in case needed) [I didn't]
is rather trivial again... once your compiler throws errors refering to mysql..
open your def file and append the respective @# part to it
(change mysql_fetch_row to my_sql_fetch_row@4 and mysql_set_character_set to mysql_set_character_set@8 etc.pp)
redo step 4 (make a new libmysql.a file with dlltool)
copy it over to your mysql library folder and you're finally through.