<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[BCB6 und MySQL]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich bin gerade dabei ein kleines Programm zu schreiben, welches Daten aus einer MySQL-Datenbank liest. Im Konsolenmodus funktioniert bisher alles, aber bei einer GUI-Anwendung funktioniert es nicht. Hier mal der ausschnitt mit aus dem Programm:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;windows.h&gt;
#include &lt;mysql.h&gt;
#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
    // deklarieren der benötigten Variablen
    MYSQL *mysql;

    // Mit dem Server verbinden
	if(mysql_real_connect(mysql, &quot;localhost&quot;, &quot;root&quot;, NULL, NULL, 0, NULL, 0))
        Label1-&gt;Caption = &quot;Verbunden...&quot;;
    else
        Label1-&gt;Caption = &quot;Nicht verbunden...&quot;;
}
//---------------------------------------------------------------------------
</code></pre>
<p>Normalerweise müsste es funktionieren, aber ich bekommen folgende Fehlermeldung:</p>
<p>[Linker Fehler] Unresolved external 'mysql_real_connect' referenced from C:\PROGRAMME\BORLAND\CBUILDER6\PROJECTS\UNIT1.OBJ</p>
<p>Warum kommt der Fehler? Ich hoffe ihr könnt mir helfen. Ich habe die Verzeichnisse auch schon ergänzt, also daran kann es eigentlich nicht liegen. Ich wäre euch sehr dankbar, wenn ihr mir helfen könntet. Ich danke euch schonmal.</p>
<p>MfG Apocalypse</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157782/bcb6-und-mysql</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 14:40:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157782.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Aug 2006 14:48:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 14:48:42 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich bin gerade dabei ein kleines Programm zu schreiben, welches Daten aus einer MySQL-Datenbank liest. Im Konsolenmodus funktioniert bisher alles, aber bei einer GUI-Anwendung funktioniert es nicht. Hier mal der ausschnitt mit aus dem Programm:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;windows.h&gt;
#include &lt;mysql.h&gt;
#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
    // deklarieren der benötigten Variablen
    MYSQL *mysql;

    // Mit dem Server verbinden
	if(mysql_real_connect(mysql, &quot;localhost&quot;, &quot;root&quot;, NULL, NULL, 0, NULL, 0))
        Label1-&gt;Caption = &quot;Verbunden...&quot;;
    else
        Label1-&gt;Caption = &quot;Nicht verbunden...&quot;;
}
//---------------------------------------------------------------------------
</code></pre>
<p>Normalerweise müsste es funktionieren, aber ich bekommen folgende Fehlermeldung:</p>
<p>[Linker Fehler] Unresolved external 'mysql_real_connect' referenced from C:\PROGRAMME\BORLAND\CBUILDER6\PROJECTS\UNIT1.OBJ</p>
<p>Warum kommt der Fehler? Ich hoffe ihr könnt mir helfen. Ich habe die Verzeichnisse auch schon ergänzt, also daran kann es eigentlich nicht liegen. Ich wäre euch sehr dankbar, wenn ihr mir helfen könntet. Ich danke euch schonmal.</p>
<p>MfG Apocalypse</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126907</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126907</guid><dc:creator><![CDATA[Apocalypse]]></dc:creator><pubDate>Tue, 29 Aug 2006 14:48:42 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 15:25:41 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>du must die .lib-Datei des MySQL-Clients mit in das Projekt mit einbinden. Der Lib-Pfad alleine reicht nicht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126946</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 29 Aug 2006 15:25:41 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 15:55:47 GMT]]></title><description><![CDATA[<p>Und wie binde ich diese ein?</p>
<p>MfG Apocalypse</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126977</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126977</guid><dc:creator><![CDATA[Apocalypse]]></dc:creator><pubDate>Tue, 29 Aug 2006 15:55:47 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 16:05:10 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Menü <em>Projekt/Dem Projekt hinzufügen</em>. Vergiß nicht dort den Dateityp auf .lib zu stellen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126983</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 29 Aug 2006 16:05:10 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 16:40:35 GMT]]></title><description><![CDATA[<p>Danke..., das hat funktioniert. Doch nun bekomme ich noch eine Exception. Da steht irgendetwas mit der Datei libmysql.dll. Was soll ich nun noch mit der Datei machen? Danke für deine Hilfe...</p>
<p>MfG Apocalypse</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127010</guid><dc:creator><![CDATA[Apocalypse]]></dc:creator><pubDate>Tue, 29 Aug 2006 16:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Tue, 29 Aug 2006 16:50:32 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>die Exception hat nichts mit der Einbindung der lib oder der dll zu tun, sondern liegt an deinem Quellcode. Schau dir also Beispielcode aus dem Netz an und vergleiche, was bei dir falsch ist.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127022</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127022</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 29 Aug 2006 16:50:32 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Wed, 30 Aug 2006 13:51:09 GMT]]></title><description><![CDATA[<p>Ein Runtime-Error in der Libmysql.dll ist eigendlich immer eine falsche SQL-Query. Schau mal mit dem Debugger, welche Query den Fehler verursacht und teste sie in der MySQL-Console.</p>
<p>mfg<br />
xXx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127650</guid><dc:creator><![CDATA[-**xXx**-]]></dc:creator><pubDate>Wed, 30 Aug 2006 13:51:09 GMT</pubDate></item><item><title><![CDATA[Reply to BCB6 und MySQL on Sat, 02 Sep 2006 10:47:13 GMT]]></title><description><![CDATA[<p>Danke..., ich habe es nun hinbekommen. Es lag wirklich an meinem Quellcode.</p>
<p>MfG Apo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1129553</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1129553</guid><dc:creator><![CDATA[Apocalypse]]></dc:creator><pubDate>Sat, 02 Sep 2006 10:47:13 GMT</pubDate></item></channel></rss>