'dlltool' is not recognized...

Hello, I am new here yes, and I was hoping someone could help me out here. I am sort of new to c++, I have done some, and then I wanted to use mysql in my applications. Now, I did some research and I found this topic :http://www.cplusplus.com/forum/windows/5259/

I followed the tutorial i think its like the 7th post, and I keep getting this error: 'dlltool' is not recognized as an internal or external command,
operable program or batch file. When I try step 3. I have looked into the directory where I have installed mysql, and there isn't anything there for it. Here is my cmdline
-----------START CMD LINE------------
C:\Program Files\MySQL\MySQL Server 5.0\lib\opt>dlltool -k -d c:\mysql++\libmysq
lclient.def -l libmysqlclient.a
'dlltool' is not recognized as an internal or external command,
operable program or batch file.
-----------END CMD LINE--------------

I know that my links are right, and I have mysql 5.0 and 5.1 installed, and the same thing just keeps happening. Please help me out.
dlltool comes with mingw compiler.
Look in the bin directory.

(it will also come with those IDEs that include mingw compiler as part of the package).

It is not part of MySQL.
C:\mysql++>c:\MinGW\bin\mingw32-make -f Makefile.mingw
g++ -c -o mysqlpp_beemutex.o -g -mthreads -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL
-DHAVE_MYSQL_SSL_SET -I"C:\Program Files\MySQL\MySQL Server 5.0\include" -MTmy
sqlpp_beemutex.o -MFmysqlpp_beemutex.o.d -MD -MP lib/beemutex.cpp
process_begin: CreateProcess(NULL, -c "g++ -c -o mysqlpp_beemutex.o -g -mthreads
-DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -DHAVE_MYSQL_SSL_SET -I\"C:\Program Files
\MySQL\MySQL Server 5.0\include\" -MTmysqlpp_beemutex.o -MFmysqlpp_beemutex.o.
d -MD -MP lib/beemutex.cpp", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [mysqlpp_beemutex.o] Error 2

Ok. So i compiled the .a file, then moved it to my mysql's lib/opt then i did
cd c:\mysql++
then the command you see in the error. None of this is making sense, please help me out. btw, i have mysql 5.0 and 5.1 installed
I have mysql++, I'll try setting it up again and see if I have any similar problems.
Tried it again and it worked for me.
Two things to try:

1. Check the version of your mingw32-make. (mingw32-make -version) - should be at least 3.4.5

2. (And I think this may well be the problem) - ensure the path to mingw\bin directory is set in your PATH environment variable. I think that it cannot find g++
and that is what is giving you the error.
Last edited on
What PATH variable? This i think is where im getting all confused!
Ok, something that might also link to this. Whenever i do things like
mingw32-make -version just like that, i get an error saying it can't find the batch file, or command internal or external.
I don't get how people can just enter in that and it works. For making the .a file, i had to make all these paths for it to worklike c:\CodeBlocks\mysql++\bin\dlltool
Yeah. This is really kinda pissing me off how it works for everyone but me, BTW: This happens a lot, i have the worst luck when it comes to this kind of stuff.
Seriously - Don't you know about the PATH environment variable?

Do a google search on Windows environment variables - there is no
end of information available.

Basically when you type in the name of a program - if you do not specfy
the full path, then Windows looks in the current directory for it, if it does not
find it there, it looks in the directories listed in the PATH environment variable. If it does not find it in any of those directories, then Windows
displays the error you mentioned.

So you need to add the mingw\bin directory to your path. I'll leave you
to do a bit of research on how to do that.

( If you are using windows XP - open a dos box and enter the command SET.
You will see all the environment variables displayed - and you will see PATH is one of them, or you can just do set path to display your path variable)

Last edited on
Thanks. I am extremely nooby at this i know, but we all have to learn sometime or another.
Topic archived. No new replies allowed.