Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

libmysql and mingw

4 views
Skip to first unread message

Daniel Boyd

unread,
Apr 8, 2011, 4:57:02 PM4/8/11
to discuss...@gnu.org
I have been trying with no success to use libmysql in Windows.

In my latest attempt, I downloaded this file:
http://devpaks.org/details.php?devpak=105

In ProjectCenter, I added libmysql.a to my libraries. Then, I added
the include directory in the project inspector.

Here is the relevant snippet of my GNUmakefile.preamble generated by
ProjectCenter:

# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -Ic:/GNUstep/libmysql-5.0.5-1sid/include

# Additional library directories the linker should search
ADDITIONAL_LIB_DIRS += -LC:/GNUstep/libmysql-5.0.5-1sid/lib

# Additional GUI libraries to link
ADDITIONAL_GUI_LIBS += -lmysql

Here are some of the errors I'm getting when I try to compile my
program: (note, this source compiles in Linux)

$ make
This is gnustep-make 2.4.0. Type 'make print-gnustep-make-help' for help.
Making all for app WPImporter...
Compiling file database.m ...
In file included from c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:65,
from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:153:1: warning: "isnan" rede
fined
In file included from c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:27,
from c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:65,
from database.h:10,
from database.m:1:
c:\gnustep\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/math.h:411:1:
warning: this is the location of the previous definition
In file included from c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:65,
from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:197:1: warning: "finite" red
efined
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:154:1: warning: this is the
location of the previous definition
In file included from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:446:1: warning: "my_reinterpr
et_cast" redefined
In file included from c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:65,
from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:339:1: warning: this is the
location of the previous definition
In file included from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:1021:1: warning: "int3store"
redefined
In file included from c:/GNUstep/libmysql-5.0.5-1sid/include/my_global.h:65,
from database.h:10,
from database.m:1:
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:271:1: warning: this is the
location of the previous definition
In file included from database.h:10,
from database.m:1:

---SNIP (more of the same...)

Linking app WPImporter ...
Creating library file: ./WPImporter.app/./WPImporter.exe.a
./obj/WPImporter.obj/dbStatement.m.o: In function `ulonglong2double':
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:223: multiple definition of
`ulonglong2double'
./obj/WPImporter.obj/database.m.o:c:/GNUstep/libmysql-5.0.5-1sid/include/config-
win.h:223: first defined here
./obj/WPImporter.obj/dbStatement.m.o: In function `rint':
c:/GNUstep/libmysql-5.0.5-1sid/include/config-win.h:212: multiple definition of
`rint'
./obj/WPImporter.obj/database.m.o:c:/GNUstep/libmysql-5.0.5-1sid/include/config-
win.h:212: first defined here
collect2: ld returned 1 exit status
make[3]: *** [WPImporter.app/./WPImporter.exe] Error 1
make[2]: *** [internal-app-run-compile-submake] Error 2
make[1]: *** [WPImporter.all.app.variables] Error 2
make: *** [internal-all] Error 2

Nicola Pero

unread,
Apr 9, 2011, 4:00:24 PM4/9/11
to Daniel Boyd, discuss...@gnu.org

> I have been trying with no success to use libmysql in Windows.

I had a quick look at the logs, and couldn't see anything that seemed
related to GNUstep.

Can you use libmysql without gnustep-make ?

You may want to try creating a simple .c file that uses your libmysql
and compile/link it with GCC directly. If that doesn't work, you know
there is some basic problem with the libmysql you're using. Maybe you
need it packaged differently for MinGW - or you'd need to ask the people
who packaged it for help or instructions.

If that works and it only doesn't work when you compile/link it using
gnustep-make, then there obviously is a problem with gnustep-make; you
may want to compare the gcc command line that works with the one used
by gnustep-make (which you can see by using 'make messages=yes') and see
if you can spot what is the troublesome compiler/linker flag. Of
course if this is the case, please come back with more logs/information
and I'll see if I can help.

I hope this provides some suggestions on how you can move forward.

Thanks


0 new messages