dbTalk Databases Forums  

Compiling library in Windows

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Compiling library in Windows in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nicholas Watmough
 
Posts: n/a

Default Compiling library in Windows - 04-19-2005 , 08:03 AM






I've not sure how I can compile the library in Windows.

I don't have Visual C++ 2003 (with IDE) to compile the provided files.

The webpage suggests downloading the Visual C++ 2003 toolkit, which I've
done, but the MySQL++ files use the VC++ project files, which require
the IDE to use.

How can I compile it using only the command line tool?

Or is it possible to compile using another Windows C++ compiler, like MingW.

Nick

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Compiling library in Windows - 04-19-2005 , 06:46 PM






Nicholas Watmough wrote:

Quote:
The webpage suggests downloading the Visual C++ 2003 toolkit,
Have you considered installing the VC++ 2005 beta? It includes the IDE,
I believe. Since they talk about an "Express" version on that page, I
expect that this IDE will continue to either be free or inexpensive once
the final product is released. Realize that Microsoft is feeling
competition from Mac OS X and Linux, both of which ship with
high-quality free development tools, so this looks to me like a move to
do something similar.

But I could be wrong.

Quote:
How can I compile it using only the command line tool?
If you know Makefile syntax, use cl and nmake. If you do this, I will
definitely include those Makefiles in the distribution.

Quote:
Or is it possible to compile using another Windows C++ compiler, like
MingW.
People have been reporting problems getting MinGW-built libraries to
work properly. I don't think this is an insurmountable problem, but
nobody has yet mustered the willpower to seriously investigate the
problem. Since the major maintainers don't use MinGW, it's not likely
to get fixed "from within", if you know what I mean.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Neil J Mackie
 
Posts: n/a

Default Re: Compiling library in Windows - 04-20-2005 , 04:41 AM



------=_NextPart_000_00AB_01C54594.88361810
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

I have great sympathy with the problems Nicholas is having. I have tried =
VC++98, VC++2003 and VC++2005 Express Beta 2 and they all have problems.

VC++98 a.k.a. VC++ 6 is seriously broken according to =
http://tangentsoft.net/mysql++/ .

The free VC++2003 which I believe is VC++7.1 is command line only, but =
the MySQL++ distribution does not include any suitable scripts for =
building the MySQL++ library so the command line tools cannot be used. =
The project file included in the distribution (which I presume is for =
the VC++7.1 IDE) is not useful with the command line tools.

The free VC++ 2005 Express Beta 2 (which I believe is VC++ 8.0) does =
read the project file included in the MySQL++ distribution (although it =
'upgrades' it) however the build very quickly fails because it cannot =
find 'windows.h' which is included from 'platform.h' . I have searched =
the files installed by VC++2005 and 'windows.h' does not appear to be =
one of them, so as far as I can tell MySQL++ does not build under VC++ =
8.

Warren's suggestion to write a Makefile is a logical step but not =
something you would ask someone who is new to the package to do. Most =
windows developers are not familiar with command line tools and I'd like =
to suggest the following:

1) Generate a Makefile from the VC++7.1 IDE using the VC++7.1 project =
file supplied with the distribution( VC++6.0 IDE could do this so I'm =
assuming it is also in 7.1) and include this Makefile in the =
distribution.=20

2) Provide a distribution containing Windows binarys. This would avoid =
the need to build and the developers must build these otherwise how =
could MySQL++ be tested on the Windows platform.

SURELY there is someone on this list who has the full VC++ 7.1 IDE and =
can generate a Makefile or binary and make it available?

Regards,
Neil (J Mackie).
------=_NextPart_000_00AB_01C54594.88361810--


Reply With Quote
  #4  
Old   
Chris Frey
 
Posts: n/a

Default Re: Compiling library in Windows - 04-20-2005 , 05:03 AM



On Wed, Apr 20, 2005 at 10:34:29AM +0100, Neil J Mackie wrote:
Quote:
The free VC++ 2005 Express Beta 2 (which I believe is VC++ 8.0) does
read the project file included in the MySQL++ distribution (although it
'upgrades' it) however the build very quickly fails because it cannot
find 'windows.h' which is included from 'platform.h' . I have searched
the files installed by VC++2005 and 'windows.h' does not appear to be
one of them, so as far as I can tell MySQL++ does not build under VC++ 8.
On VC++ 7.0, windows.h is under the "PlatformSDK" directory. Windows.h
has been the main windows header file since the Windows 3.0 days, and probably
earlier. I'm quite surprised it's not there.

I don't use mysql++ on windows... just providing a data point.

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: Compiling library in Windows - 04-20-2005 , 12:34 PM



Neil J Mackie wrote:
Quote:
cannot find 'windows.h' which is included from 'platform.h' .
Download the Platform SDK from msdn.microsoft.com. It should be in there.

Quote:
1) Generate a Makefile from the VC++7.1 IDE using the VC++7.1 project
file
Barf. Generated Makefiles are un-debuggable. I said I'd accept
Makefiles into the distribution, but these generated ones don't count.
They need to be readable to normal humans.

Quote:
2) Provide a distribution containing Windows binarys.
The only reason I do it on Linux is because of the way package systems
work. On Windows, you'll be including the DLL with your program. (Or
you would, if building a DLL were possible....still some gold stars to
be had here, guys.)

Quote:
SURELY there is someone on this list who has the full VC++ 7.1 IDE
and can generate a Makefile or binary and make it available?
Can. Won't.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #6  
Old   
Neil J Mackie
 
Posts: n/a

Default Re: Compiling library in Windows - 04-21-2005 , 08:48 AM



First, thanks to Warren and ahnkle for their suggestions to download and
install the platform SDK. Doing so provided the file windows.h.

Warren added
Quote:
Generated Makefiles are un-debuggable.
And the VC++ IDE is opaque, difficult to use, and a printed version of the
nmake documentation is impossible to find. That said we do what we have to.
I find that editing the generated Makefiles (with great care) is often
easier than doing the same job via the VC++ IDE.

Quote:
On Windows, you'll be including the DLL with your program. (Or you
would, if building a DLL were possible
Are you saying that MySQL++ cannot currently be built as a DLL ?
If so, some advice on how it _should_ be built would be welcome to those
trying to build on windows.

Quote:
SURELY there is someone on this list who has the full VC++ 7.1 IDE
and can generate a Makefile or binary and make it available?
Can. Won't.
So although you recommend the free VC++ 2003 command line only tools, trying
to use them is pointless because there is no make file for MySQL++. Why then
make the recommendation? The only other option is to purchase the VC++ IDE
from Microsoft and use the supplied project file, but I prefer not to give
my money to Microsoft. They waste too much of my time already, without
having to pay them for doing so.


In order to answer the originator of this thread I include a makefile below
for MySQL++ which has been adapted from a VC++ 6.0 generated makefile. Using
it I have been able to use the command line only VC++ 2003 tools to build a
MySQL++ library from the 'Visual C++ Toolkit 2003 Command Prompt' which is
available from your menu once you install the toolkit.

Having said that I have not been able to successfully link using the
library. It may be some time till I sort out the problems that seem to be
caused by mixing debug/nodebug, static/dll, single/multi-threaded libraries
from VC++ 6, VC++2003, VC++2005 express & XP SP2 SDK, which is why it is
included here as a work in progress. A timely answer now may be more use
than a perfect answer that is late. If I make progress I'll post an update.

Regards,
Neil (J Mackie)

----- start mysql++.mak -----
# NMAKE build file for MySQL++ adapted from a
# Microsoft Developer Studio Generated NMAKE File
# run using nmake /D /f "mysql++.mak" CFG="mysql++ - win32 release"
# or nmake /D /f "mysql++.mak" CFG="mysql++ - win32 debug"
!IF "$(CFG)" == ""
CFG=mysql++ - win32 debug
!MESSAGE No configuration specified. Defaulting to mysql++ - win32 debug.
!ENDIF

!IF "$(CFG)" != "mysql++ - win32 release" && "$(CFG)" != "mysql++ - win32
debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mysql++.mak" CFG="mysql++ - win32 debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mysql++ - win32 release" (based on "Win32 (x86) Static Library")
!MESSAGE "mysql++ - win32 debug" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF

CPP=cl.exe
RSC=rc.exe

!IF "$(CFG)" == "mysql++ - win32 release"

OUTDIR=.\release
INTDIR=.\release\tmp
# Begin Custom Macros
OutDir=.\release
# End Custom Macros

!IF "$(RECURSE)" == "0"

ALL : "$(OUTDIR)\mysql++.lib"

!ELSE

ALL : "$(OUTDIR)\mysql++.lib"

!ENDIF

!IF "$(RECURSE)" == "1"
CLEAN :""
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\coldata.obj"
-@erase "$(INTDIR)\connection.obj"
-@erase "$(INTDIR)\datetime.obj"
-@erase "$(INTDIR)\field_names.obj"
-@erase "$(INTDIR)\field_types.obj"
-@erase "$(INTDIR)\fields.obj"
-@erase "$(INTDIR)\manip.obj"
-@erase "$(INTDIR)\myset.obj"
-@erase "$(INTDIR)\query.obj"
-@erase "$(INTDIR)\result.obj"
-@erase "$(INTDIR)\row.obj"
-@erase "$(INTDIR)\sql_query.obj"
-@erase "$(INTDIR)\sql_string.obj"
-@erase "$(INTDIR)\string_util.obj"
-@erase "$(INTDIR)\type_info.obj"
-@erase "$(INTDIR)\vallist.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\mysql++.lib"

"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

"$(INTDIR)" :
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"

CPP_PROJ=/nologo /G6 /Zp4 /MD /W3 /GR /GX /O2 /X /I "c:\Program
Files\Microsoft Visual C++ Toolkit 2003\Include" /I "c:\Program
Files\Microsoft Platform SDK for Windows XP SP2\Include" /I
"c:\unix\MySQL\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D
"_AFXDLL" /Fp"$(INTDIR)\TDB_class.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"
/FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mysql++.bsc"
BSC32_SBRS= \

LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\mysql++.lib"
LIB32_OBJS= \
"$(INTDIR)\coldata.obj" \
"$(INTDIR)\connection.obj" \
"$(INTDIR)\datetime.obj" \
"$(INTDIR)\field_names.obj" \
"$(INTDIR)\field_types.obj" \
"$(INTDIR)\fields.obj" \
"$(INTDIR)\manip.obj" \
"$(INTDIR)\myset.obj" \
"$(INTDIR)\query.obj" \
"$(INTDIR)\result.obj" \
"$(INTDIR)\row.obj" \
"$(INTDIR)\sql_query.obj" \
"$(INTDIR)\sql_string.obj" \
"$(INTDIR)\string_util.obj" \
"$(INTDIR)\type_info.obj" \
"$(INTDIR)\vallist.obj"

"$(OUTDIR)\mysql++.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<

!ELSEIF "$(CFG)" == "mysql++ - win32 debug"

OUTDIR=.\debug
INTDIR=.\debug\tmp
# Begin Custom Macros
OutDir=.\debug
# End Custom Macros

!IF "$(RECURSE)" == "0"

ALL : "$(OUTDIR)\mysql++.lib"

!ELSE

ALL : "$(OUTDIR)\mysql++.lib"

!ENDIF

!IF "$(RECURSE)" == "1"
CLEAN :""
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\coldata.obj"
-@erase "$(INTDIR)\connection.obj"
-@erase "$(INTDIR)\datetime.obj"
-@erase "$(INTDIR)\field_names.obj"
-@erase "$(INTDIR)\field_types.obj"
-@erase "$(INTDIR)\fields.obj"
-@erase "$(INTDIR)\manip.obj"
-@erase "$(INTDIR)\myset.obj"
-@erase "$(INTDIR)\query.obj"
-@erase "$(INTDIR)\result.obj"
-@erase "$(INTDIR)\row.obj"
-@erase "$(INTDIR)\sql_query.obj"
-@erase "$(INTDIR)\sql_string.obj"
-@erase "$(INTDIR)\string_util.obj"
-@erase "$(INTDIR)\type_info.obj"
-@erase "$(INTDIR)\vallist.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\mysql++.lib"

"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

"$(INTDIR)" :
if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"

CPP_PROJ=/nologo /G6 /Zp4 /MDd /W3 /Gm /GR /GX /ZI /Od /X /I "c:\Program
Files\Microsoft Visual C++ Toolkit 2003\Include" /I "c:\Program
Files\Microsoft Platform SDK for Windows XP SP2\Include" /I
"c:\unix\MySQL\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB"
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\mysql++.bsc"
BSC32_SBRS= \

LIB32=link.exe -lib
LIB32_FLAGS=/nologo /out:"$(OUTDIR)\mysql++.lib"
LIB32_OBJS= \
"$(INTDIR)\coldata.obj" \
"$(INTDIR)\connection.obj" \
"$(INTDIR)\datetime.obj" \
"$(INTDIR)\field_names.obj" \
"$(INTDIR)\field_types.obj" \
"$(INTDIR)\fields.obj" \
"$(INTDIR)\manip.obj" \
"$(INTDIR)\myset.obj" \
"$(INTDIR)\query.obj" \
"$(INTDIR)\result.obj" \
"$(INTDIR)\row.obj" \
"$(INTDIR)\sql_query.obj" \
"$(INTDIR)\sql_string.obj" \
"$(INTDIR)\string_util.obj" \
"$(INTDIR)\type_info.obj" \
"$(INTDIR)\vallist.obj"

"$(OUTDIR)\mysql++.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<

!ENDIF

..c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

..cpp{$(INTDIR)}.o\<bj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

..cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<

..c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<

..cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<

..cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<


!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("mysql++.dep")
!INCLUDE "mysql++.dep"
!ELSE
!MESSAGE Warning: cannot find "mysql++.dep"
!ENDIF
!ENDIF


!IF "$(CFG)" == "mysql++ - win32 release" || "$(CFG)" == "mysql++ - win32
debug"
SOURCE=.\lib\coldata.cpp

"$(INTDIR)\coldata.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\connection.cpp

"$(INTDIR)\connection.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\datetime.cpp

"$(INTDIR)\datetime.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\field_names.cpp

"$(INTDIR)\field_names.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\field_types.cpp

"$(INTDIR)\field_types.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\fields.cpp

"$(INTDIR)\fields.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\manip.cpp

"$(INTDIR)\manip.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\myset.cpp

"$(INTDIR)\myset.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\query.cpp

"$(INTDIR)\query.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\result.cpp

"$(INTDIR)\result.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\row.cpp

"$(INTDIR)\row.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\sql_query.cpp

"$(INTDIR)\sql_query.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\sql_string.cpp

"$(INTDIR)\sql_string.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\string_util.cpp

"$(INTDIR)\string_util.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\type_info.cpp

"$(INTDIR)\type_info.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)


SOURCE=.\lib\vallist.cpp

"$(INTDIR)\vallist.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)



!ENDIF

----- end mysql++.mak -----


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #7  
Old   
Warren Young
 
Posts: n/a

Default Re: Compiling library in Windows - 04-21-2005 , 10:20 AM



Neil J Mackie wrote:

Quote:
a printed version of
the nmake documentation is impossible to find.
You don't need it. Any general Unix make(1) document will suffice.
nmake doesn't support things like the GNU make extensions, of course,
but you don't absolutely need those.

Get a copy of O'Reilly's _Managing Projects with GNU Make_ if you want
something on paper. I'm sure a subset of it is quite relevant to nmake.

Quote:
I find that editing the generated Makefiles (with great care)
is often easier than doing the same job via the VC++ IDE.
It's far easier still to edit a well-structured Makefile written by a
programmer for other programmers.

Quote:
Are you saying that MySQL++ cannot currently be built as a DLL ?
Yes. It's on the Wishlist.

Quote:
If so, some advice on how it _should_ be built would be welcome to those
trying to build on windows.
Easy: build it as a lib file and link it to your program. Further
details are in README.vc++.

If your program is closed-source, statically linking to the library is a
violation of the LGPL, but until someone provides a way for you to
comply with the LGPL, I don't see how anyone can get too uptight.

Quote:
trying to use them is pointless because there is no make file for
MySQL++. Why then make the recommendation?
I assume that users of MySQL++ are programmers, and can therefore cope.

Look, you are limiting yourself to free (as in beer) tools. That's
fine, I understand. But I am the only MySQL++ maintainer that has any
interest in VC++ support, and as a professional programmer I have Visual
C++ Professional. I have no personal interest in helping you build this
with the free tools. In making the recommendation, it's enough that I
know that it can be done. The fact that it isn't ready to go out of the
box is not a fatal problem.

The amount of time you've spent arguing with me and expressing your
outrage would have been better spent learning Makefile syntax.

Quote:
In order to answer the originator of this thread I include a makefile
below for MySQL++ which has been adapted from a VC++ 6.0 generated
makefile.
Sorry, far too ugly to accept. This shouldn't have to be any more
complicated than examples/Makefile.simple, and longer only due to the
greater number of files involved.

If you don't know Makefile syntax, reading that file in conjunction with
whatever tutorial you pick is a good start.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #8  
Old   
Zahroof Mohamed
 
Posts: n/a

Default Re: Compiling library in Windows - 04-21-2005 , 10:56 AM



On 4/21/05, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Neil J Mackie wrote:
Are you saying that MySQL++ cannot currently be built as a DLL ?
=20
Yes. It's on the Wishlist.
=20
If so, some advice on how it _should_ be built would be welcome to thos=
e
trying to build on windows.
=20
Easy: build it as a lib file and link it to your program. Further
details are in README.vc++.
=20
If your program is closed-source, statically linking to the library is a
violation of the LGPL, but until someone provides a way for you to
comply with the LGPL, I don't see how anyone can get too uptight.
=20
If you are suggesting that you can't create a DLL in windows, you
would be wrong. With some minor modifications to the MySQL++ files
(I've posted this before) I do create a DLL with Mingw and gcc. I have
no problems linking with this DLL in windows.

I do have a problem with linking to the MySQL libraries when they are
included in multiple header files in my project. But that is because
the libraries have been built using VC++ for windows and I need to
rebuild them with MingW. Once I have this resolved, everything is
peachy.

Unfortunately, I come from the Windows/ original Microsoft bandwagon -
and so, my knowledge of Unix like tools is next to nil. I'm going to
get a copy of O'Reilly's book that you recommended here to help me
out. But I'm also looking for a set of tools that will work for
Windows. I'm having problems with MingW's MSYS and I'm wondering
whether I should install Cygwin on my system. Any advice would be
welcome.

Zahroof

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #9  
Old   
Warren Young
 
Posts: n/a

Default Re: Compiling library in Windows - 04-21-2005 , 11:07 AM



Zahroof Mohamed wrote:

Quote:
If you are suggesting that you can't create a DLL in windows, you
would be wrong.
My comment was restricted to building with VC++.

As I recall, the DLL does get created, but one can't link to it. I
don't think it's a major undertaking to figure out why, but again,
nobody yet has shown an interest in attacking the problem.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #10  
Old   
Andrew Zhu
 
Posts: n/a

Default Re: Compiling library in Windows - 04-22-2005 , 10:23 AM



You are not necessary to pay for learning gmake. here
is the link:
http://www.gnu.org/software/make/manual/make.html

I love MinGW and used it quite some years. I don't
know what is the problem you have with it. but many
beginners (including myself) often forget the fact
that some binaries compiled from MinGW should not be
run in MinGW and they will be OK in Windows cmd.

I really understand the issue you raised here for
compile and execute mysql++ in MinGW. I tried to do it
a couple of years ago and it only works for mysql++
1.7.6 (1.7.9?) with libmysqlclient for 3.x. The key is
not for compiling mysql++; instead, it is
libmysqlclient is important. Over that time, a guy
successfully compiled this lib with mingw and I
utilized his library. but a couple of month later this
guy's website disappeared. His "name" is Johnnydog.
You can search for his posting in this forum to get
hints how he took steps to get lib compiled with
mingw. It was very lengthy and nasty twists, though.

I don't know if there are some developers out there
and interested in working on a MinGW-version of mysql
source. This is the ultimate solution to the problem.
(if you are familiar with PostgreSQL project, it has a
separate team for its windows tree which adopts
MinGW).

Good luck.

Andy

--- Zahroof Mohamed <zahroofm (AT) gmail (DOT) com> wrote:
Quote:
On 4/21/05, Warren Young <mysqlpp (AT) etr-usa (DOT) com
wrote:
Neil J Mackie wrote:
Are you saying that MySQL++ cannot currently be
built as a DLL ?

Yes. It's on the Wishlist.

If so, some advice on how it _should_ be built
would be welcome to those
trying to build on windows.

Easy: build it as a lib file and link it to your
program. Further
details are in README.vc++.

If your program is closed-source, statically
linking to the library is a
violation of the LGPL, but until someone provides
a way for you to
comply with the LGPL, I don't see how anyone can
get too uptight.


If you are suggesting that you can't create a DLL in
windows, you
would be wrong. With some minor modifications to the
MySQL++ files
(I've posted this before) I do create a DLL with
Mingw and gcc. I have
no problems linking with this DLL in windows.

I do have a problem with linking to the MySQL
libraries when they are
included in multiple header files in my project. But
that is because
the libraries have been built using VC++ for windows
and I need to
rebuild them with MingW. Once I have this resolved,
everything is
peachy.

Unfortunately, I come from the Windows/ original
Microsoft bandwagon -
and so, my knowledge of Unix like tools is next to
nil. I'm going to
get a copy of O'Reilly's book that you recommended
here to help me
out. But I'm also looking for a set of tools that
will work for
Windows. I'm having problems with MingW's MSYS and
I'm wondering
whether I should install Cygwin on my system. Any
advice would be
welcome.

Zahroof

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:

http://lists.mysql.com/plusplus?unsu...ahoo (DOT) com


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.