List:MySQL on Win32« Previous MessageNext Message »
From:Káity György Date:August 27 2005 5:47pm
Subject:Re: Lcc win32 mySQL
In-reply-to:
<OF9B03BB1D.EBBBCDC4-ON85257067.00482DD9-85257067.00493D6C@unimin.com>
View as plain text  
>>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
Thread
Lcc win32 mySQLMartin Fankhauser22 Aug
  • Re: Lcc win32 mySQLKáity György24 Aug
    • Re: Lcc win32 mySQLSGreen24 Aug
Re: Lcc win32 mySQLKáity György27 Aug