2 messages in com.mysql.lists.win32libmysql.lib| From | Sent On | Attachments |
|---|---|---|
| Wolfgang Pichler | 25 Jan 2001 10:33 | |
| Sinisa Milivojevic | 26 Jan 2001 07:55 |
| Subject: | libmysql.lib![]() |
|---|---|
| From: | Wolfgang Pichler (wpic...@nextra.at) |
| Date: | 01/25/2001 10:33:03 AM |
| List: | com.mysql.lists.win32 |
Hi
I've already triied to include windows.h but it doesn't work. Here is some
example code which also doesn't work:
File main.cpp
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include "main.h"
#include <sqlplus.hh>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender) { MYSQL *sqlstruct;
sqlstruct = mysql_connect(meinsql,"localhost","root",""); }
And here is the Option file which shows that I include libmysql.lib
<?xml version='1.0' encoding='us-ascii' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="test.exe"/>
<OBJFILES value="test.obj main.obj"/>
<RESFILES value="test.res"/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) main.dfm"/>
<LIBFILES value="libmysql.lib"/>
<LIBRARIES value=""/>
<SPARELIBS value="VCL50.lib"/>
<PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi dclocx50.bpi
bcb2kaxserver50.bpi"/>
<PATHCPP value=".;"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="tlink32"/>
<USERDEFINES value="_DEBUG"/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="test.cpp"/>
<INCLUDEPATH
value="$(BCB)\include;$(BCB)\include\vcl;C:\mysql\mysql++1_7_1win32_borland_1_1\include\mysql\;"C:\mysql\mysql++1_7_1win32_borland_1_1\include\sqlplus\""/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par"/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y
-v -vi- -c
-tW -tWM"/>
<PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
<RFLAGS value=""/>
<AFLAGS value="/mx /w2 /zd"/>
<LFLAGS value="-D"" -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib"/>
</LINKER>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1031
CodePage=1252
[Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments=
[HistoryLists\hlIncludePath] Count=4 Item0=$(BCB)\include;$(BCB)\include\vcl;C:\mysql\mysql++1_7_1win32_borland_1_1\include\mysql\;C:\mysql\mysql++1_7_1win32_borland_1_1\include\sqlplus Item1=$(BCB)\include;$(BCB)\include\vcl;C:\mysql\mysql++1_7_1win32_borland_1_1\include\mysql\ Item2=$(BCB)\include;$(BCB)\include\vcl;C:\mysql\mysql++1_7_1win32_borland_1_1\include\mysql Item3=$(BCB)\include;$(BCB)\include\vcl
[HistoryLists\hlLibraryPath] Count=1 Item0=$(BCB)\lib\obj;$(BCB)\lib
[HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl
[HistoryLists\hlConditionals] Count=1 Item0=_DEBUG
[Debugging] DebugSourceDirs=$(BCB)\source\vcl
[Parameters] RunParams= HostApplication= RemoteHost= RemotePath= RemoteDebug=0
[Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 </IDEOPTIONS> </PROJECT>
So can anyone tell me what went wrong ??????
Thanx for every idea
----- Original Message ----- From: "Arturs Aboltins" <Artu...@lattelekom.lv> To: "'Wolfgang Pichler'" <wpic...@nextra.at> Sent: Monday, January 08, 2001 6:22 AM Subject: RE: Hi
Hello Wolfgang ! One of the most imprtant thngs, is that you always must include <windows.h> in alll your cpp files. Look in the examples available in downloaded packgage in /src/.../examples directory
Arturs
-----Original Message----- From: Wolfgang Pichler [mailto:wpic...@nextra.at] Sent: Saturday, January 06, 2001 11:11 AM To: aabo...@exchange.telekom.lv Subject: Hi
I've downloaded your version of the mysql++ api for the Borland C Builder 5.0 but I can't use it because of an linker error. The linker reports that he couldn't find the external for some/all functions which are defined in the mysql.h header file. I've already triied to link the libmysql.lib but nothing worked. Is there anywhere a running example for the use with mysql.h so that I can see what went wrong or can you help me ?
mfG Wolfgang Pichler




