Lcc win32 mySQL

Lcc win32 mySQL

am 22.08.2005 14:38:00 von Martin Fankhauser

hello!

i work under c (lcc win32) and i want to make a little c-program that
establishes a connection to a mysql database. just very simple.
i have no problem with the code.
but i am very confused which files i have to include and link together,
and where to get these files.
this cannot be that difficult but it doesn't work. (i need the
mysqlclient.lib, where do i get it ? , are there other libraries ?)
please help me,thanks.

martin


ps: i work under winxp prof.

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: Lcc win32 mySQL

am 24.08.2005 11:19:50 von gykaity

Hi,

I was searhing the answer for a similar question ( GNU C + Win + MySQL)
in this mailing list a few months ago. Nobody answers. In the MySQL
manual there is example, but it does not work (needed Cygwin). So I use
Dev-C++ environment (with GNU C) with the MySQL package. I tried some
simple queries and inserts, it works (with MySQL 4.1.10).

Bye,
Gyk

> hello!
>
> i work under c (lcc win32) and i want to make a little c-program that
> establishes a connection to a mysql database. just very simple.
> i have no problem with the code.
> but i am very confused which files i have to include and link
> together, and where to get these files.
> this cannot be that difficult but it doesn't work. (i need the
> mysqlclient.lib, where do i get it ? , are there other libraries ?)
> please help me,thanks.
>
> martin
>
>
> ps: i work under winxp prof.



--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: Lcc win32 mySQL

am 24.08.2005 15:16:05 von SGreen

--=_alternative 00493D6A85257067_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

K=E1ity György wrote on 08/24/2005 05:19:50 AM:

> Hi,
>=20
> I was searhing the answer for a similar question ( GNU C + Win + MySQL)=20
> in this mailing list a few months ago. Nobody answers. In the MySQL=20
> manual there is example, but it does not work (needed Cygwin). So I use=20
> Dev-C++ environment (with GNU C) with the MySQL package. I tried some=20
> simple queries and inserts, it works (with MySQL 4.1.10).
>=20
> Bye,
> Gyk
>=20
> > hello!
> >
> > i work under c (lcc win32) and i want to make a little c-program that=20
> > establishes a connection to a mysql database. just very simple.
> > i have no problem with the code.
> > but i am very confused which files i have to include and link=20
> > together, and where to get these files.
> > this cannot be that difficult but it doesn't work. (i need the=20
> > mysqlclient.lib, where do i get it ? , are there other libraries ?)
> > please help me,thanks.
> >
> > martin
> >
> >
> > ps: i work under winxp prof.=20
>=20

I think most people wonder why you are trying to develop in a Linux-like=20
shell running under Win32 (Cygwin). Why not work directly in a Linux or=20
Win32 environment. What advantage do you have by building a Cygwin app=20
over doing something natively Linux or Win32?=20

As you can tell from my questions, I am only marginally aware of what=20
Cygwin is or does (I have used it on occasion to create "remote destops"=20
from several of the Linux servers we have on site but that is about it).=20
Please help me understand the niche Cygwin fills for you and why your app=20
needs to run in the emulated Linux environment rather than the host=20
environment. It's my theory that few people are actually doing what you=20
are doing and that may explain why there is so little peer-to-peer=20
assistance available on this list.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



--=_alternative 00493D6A85257067_=--

Re: Lcc win32 mySQL

am 27.08.2005 19:47:48 von gykaity

>>Hi,
>>
>>I was searhing the answer for a similar question ( GNU C + Win + MySQL)
>>in this mailing list a few months ago. Nobody answers. In the MySQL
>>manual there is example, but it does not work (needed Cygwin). So I use
>>Dev-C++ environment (with GNU C) with the MySQL package. I tried some
>>simple queries and inserts, it works (with MySQL 4.1.10).
>>
>>Bye,
>>Gyk
>>
>>
>>
>>>hello!
>>>
>>>i work under c (lcc win32) and i want to make a little c-program that
>>>establishes a connection to a mysql database. just very simple.
>>>i have no problem with the code.
>>>but i am very confused which files i have to include and link
>>>together, and where to get these files.
>>>this cannot be that difficult but it doesn't work. (i need the
>>>mysqlclient.lib, where do i get it ? , are there other libraries ?)
>>>please help me,thanks.
>>>
>>>martin
>>>
>>>
>>>ps: i work under winxp prof.
>>>
>>>
>
>I think most people wonder why you are trying to develop in a Linux-like
>shell running under Win32 (Cygwin). Why not work directly in a Linux or
>Win32 environment. What advantage do you have by building a Cygwin app
>over doing something natively Linux or Win32?
>
>As you can tell from my questions, I am only marginally aware of what
>Cygwin is or does (I have used it on occasion to create "remote destops"
>from several of the Linux servers we have on site but that is about it).
>Please help me understand the niche Cygwin fills for you and why your app
>needs to run in the emulated Linux environment rather than the host
>environment. It's my theory that few people are actually doing what you
>are doing and that may explain why there is so little peer-to-peer
>assistance available on this list.
>
>Shawn Green
>Database Administrator
>Unimin Corporation - Spruce Pine
>
>
>
>
>
Well, I do not know why Cygwin. I'm a home programmer. I read it in a
manual, that MySQL source must be compiled under Cygwin if I want a
Windows version. Perhaps it is false? I tried, I failed. I read it too,
that my_global.h must be included in my client source, but in that case
there are many errors when compiled. Under Windows I was not able to
link mysqlclient.lib to my exe, but mysql.lib is OK.

To Martin:
Now I use MingW 3.4.2 (without Dev-C++ and its package) and MySQL 4.1.10
and they work fine together. With lcc the procedure is similar (I
think, the syntax of the parameters may alter):
- in your source you must include mysql.h (after windows.h)
- when compile, you must add the path, where mysql.h is (on my computer:
c:/program files/mysql/include)
- when link, you must add libmysql.lib for linking and the path, where
libmysql.lib is (at me: c:/program files/mysql/lib/opt)

With GNU g++, I make such way (console version):
compile: g++ -c myprog.cpp -o myprog.o -I"c:/program
files/mysql/include" -I"other mingw include paths"
link: g++ myprog.o -o myprog.exe -L"c:/program
files/mysql/lib/opt" -lmysql

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org