5 messages in com.mysql.lists.win32RE: C client
FromSent OnAttachments
devc...@ev1.net17 Dec 2000 19:12 
Jorge del Conde17 Dec 2000 20:39 
Mani Murugesan18 Dec 2000 00:18 
devc...@ev1.net18 Dec 2000 02:48 
Arturs Aboltins18 Dec 2000 23:20 
Subject:RE: C client
From:Arturs Aboltins (Artu@lattelekom.lv)
Date:12/18/2000 11:20:37 PM
List:com.mysql.lists.win32

Hello !

I am using Borland C++. I alaways (this is impportant) include windows.h in my cpp files, otherwise application doesn't link correctly. It doesn't matter are you writing DOS console application or GUI. Anyway YOU ALWAYS USE DLL, and DLLs never worked in pure DOS !

Arturs mailto:aabo@exchange.telekom.lv t.:7321566

-----Original Message----- From: devc@ev1.net [mailto:devc@ev1.net] Sent: Monday, December 18, 2000 12:49 PM To: win@lists.mysql.com Subject: Re: C client

Thanks Jorge and Mani, i overlooked that part :)

Btw, do you need to include <windows.h> for any program written under windows? What i mean is if i can write a normal dos console applicatation with just <stdio> and mysql.h. I assume i do because i get 102 errors without it hehe.. just trying to make sure i'm not missing something else.

Thanks again, now i have something to work on! Cisk

At 10:39 PM 12/17/00 -0600, Jorge del Conde wrote:

Hi,

Your code looks fine. Are you linking your code correctly with libmySQL.lib ?

Regards Jorge

I'm trying to write a simple connection script in windoze. I have tried using Visual C++ 6.0 and Borland 1.52.(I want to write it in win32 for right now then do a linux version to learn).

anyway, i can't seem to get to work. It keeps saying "unresolved externals" on all the mysql functions even tho i included mysql.h.. i can't seem to figure out why.

would really appreciate any help in doing this in windows and not just "just do it in linux" :) I copied the header files for mysql to my current directory.. and i also explicitly declared their path in each headerfile.

:===================== #include <stdio.h> #include "mysql.h" // in current directory also tried #include "c:\mysql\include\mysql.h" and in the header files that need it MYSQL *conn; int main(void) { conn = mysql_init(NULL); mysql_real_connect(conn, NULL, NULL, NULL, "x", 0, NULL ,0); mysql_close(conn); return 0; }

maybe i'm doing something completely wrong?

any help would be appreciated :)

Cisk