wxDatabaselayer for Firebird 2.0 with wxDevcpp Topic is solved
-
- Earned a small fee
- Posts: 13
- Joined: Fri Feb 23, 2007 12:23 am
wxDatabaselayer for Firebird 2.0 with wxDevcpp
Good day, as I can compile wxDatabaselayer 1.7.1 for Firebird 2.0 with wxDevcpp, I tried this tip:
http://wxcode.sourceforge.net/docs/data ... evcpp.html
But I do not know which option to use.
I tried to compile in some options, generated this lib "databaselayer_firebird.a" of 678Kb. I created a new project includes all the necessary paths and libs but when I compile appears the following 2 errors:
[Linker Error] undefined reference to `fb_interpret@12'
[Linker Error] undefined reference to `fb_interpret@12'
Thanks.
http://wxcode.sourceforge.net/docs/data ... evcpp.html
But I do not know which option to use.
I tried to compile in some options, generated this lib "databaselayer_firebird.a" of 678Kb. I created a new project includes all the necessary paths and libs but when I compile appears the following 2 errors:
[Linker Error] undefined reference to `fb_interpret@12'
[Linker Error] undefined reference to `fb_interpret@12'
Thanks.
-
- Earned some good credits
- Posts: 110
- Joined: Tue Jan 23, 2007 12:22 pm
- Location: Kiel, Germany
- Contact:
i'm not sure where your problem lies... i had none compiling the lib for pgSQL...
is it that you don't succeed in compiling the lib for the FirebirdDatabaseLayer or that you can't link your projects against the new lib?
the hint-site you posted seems very clear to me. with screenshots... it's even the firebird sample! just enter everything as it is shown on the screens...
anyway, if you wish, we can set up a skype/icq/irc session and try it together...
is it that you don't succeed in compiling the lib for the FirebirdDatabaseLayer or that you can't link your projects against the new lib?
the hint-site you posted seems very clear to me. with screenshots... it's even the firebird sample! just enter everything as it is shown on the screens...
anyway, if you wish, we can set up a skype/icq/irc session and try it together...
which option regarding what? the libs to link against? the compiler flags? don't quite understand...fabinhomartins wrote:But I do not know which option to use.
OS: Win XP PRO SP2 (fully updated)
proc: INTEL Core 2 Duo E6400
wx: wxDevCpp (always latest stable)
proc: INTEL Core 2 Duo E6400
wx: wxDevCpp (always latest stable)
-
- Earned a small fee
- Posts: 13
- Joined: Fri Feb 23, 2007 12:23 am
Hello, I delayed to answer because other projects had taken the time of my studies in wxWidgets.
I compiled and obtained the lib to Databaselayer for Firebird 2.0, but when I go to link it my project always appears this error:
I compiled and obtained the lib to Databaselayer for Firebird 2.0, but when I go to link it my project always appears this error:
Code: Select all
Compilador: Default GCC compiler
Building Makefile: "D:\Meus Documentos\Fabiano\wxWidgets\Exemplos_wxDevcpp\Firebird_Databaselayer_15-08-07\Makefile.win"
Executando make...
mingw32-make.exe -f "D:\Meus Documentos\Fabiano\wxWidgets\Exemplos_wxDevcpp\Firebird_Databaselayer_15-08-07\Makefile.win" all
windres.exe --input-format=rc -o Projeto1_private.res --include-dir "C:/ARQUIV~1/Dev-Cpp/include/common" PROJET~2.RC -O coff
g++.exe Projeto1App.o Projeto1Dlg.o Projeto1_private.res -o "Projeto1.exe" -L"C:/Arquivos de programas/Dev-Cpp/Lib" -L"D:/Instaladores/wxWidgets/databaselayer_src_1.6/databaselayer/lib" -L"C:/Arquivos de programas/Firebird/Firebird_2_0/lib" ../../../../../Instaladores/wxWidgets/databaselayer_src_1.6/databaselayer/lib/databaselayer_firebird.a "C:/Arquivos de programas/Firebird/Firebird_2_0/lib/fbclient_ms.lib" "C:/Arquivos de programas/Firebird/Firebird_2_0/lib/ib_util_ms.lib" -mwindows -lwxmsw28 -lwxmsw28_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 -s
../../../../../Instaladores/wxWidgets/databaselayer_src_1.6/databaselayer/lib/databaselayer_firebird.a(FirebirdDatabaseLayer.o):FirebirdDatabaseLayer.cpp:(.text+0x2e82): undefined reference to `fb_interpret@12'
../../../../../Instaladores/wxWidgets/databaselayer_src_1.6/databaselayer/lib/databaselayer_firebird.a(FirebirdDatabaseLayer.o):FirebirdDatabaseLayer.cpp:(.text+0x2f48): undefined reference to `fb_interpret@12'
collect2: ld returned 1 exit status
mingw32-make.exe: *** [Projeto1.exe] Error 1
Execu
-
- Earned a small fee
- Posts: 13
- Joined: Fri Feb 23, 2007 12:23 am
I made what you he suggested, I change the project options to -lfbclient_ms, I set paths of libs and includes too.
Now when I try this code:
the follow error that appears:
Now when I try this code:
Code: Select all
void Projeto1Dlg::WxButton1Click(wxCommandEvent& event)
{
try
{
DatabaseLayer *db = new FirebirdDatabaseLayer();
//db->Open(_("DBTESTE.GDB"));
}//fim try
catch(DatabaseLayerException& e)
{
wxMessageBox(wxString::Format(wxT("%d: %s."),e.GetErrorCode(),e.GetErrorMessage().c_str()),wxT("Database Error"));
}//fim catch
}
Code: Select all
g++.exe Projeto1App.o Projeto1Dlg.o Projeto1_private.res -o "Projeto1.exe" -L"C:/Arquivos de programas/Dev-Cpp/Lib" -L"C:/Arquivos de programas/Dev-Cpp/databaselayer/lib" -L"C:/Arquivos de programas/Firebird/Firebird_2_0/lib" -fbclient_ms -ib_util_ms -mwindows -lwxmsw28 -lwxmsw28_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 -databaselayer_firebird_ANSI_MONO -s
Projeto1Dlg.o:Projeto1Dlg.cpp:(.text+0xc8c): undefined reference to `FirebirdDatabaseLayer::FirebirdDatabaseLayer()'
collect2: ld returned 1 exit status
mingw32-make.exe: *** [Projeto1.exe] Error 1
Execu
-
- Earned some good credits
- Posts: 110
- Joined: Tue Jan 23, 2007 12:22 pm
- Location: Kiel, Germany
- Contact:
just an idea, because i had similar mysterious problems:
could it be that you have disabled exception handling for the compiler/linker by setting the -fnoexceptions flag (i think it's a compiler flag)?
that led to unexplainable compiler/linker errors until i switched the flag to -fexceptions... then everything worked fine and as expected...
==break==
i'm not quite sure (since my IDEs do all the config stuff for me), but i think the order of the switches also does matter for compiling and linking. did you try to move the -lfbclient_ms switch to the very end?
could it be that you have disabled exception handling for the compiler/linker by setting the -fnoexceptions flag (i think it's a compiler flag)?
that led to unexplainable compiler/linker errors until i switched the flag to -fexceptions... then everything worked fine and as expected...
==break==
i'm not quite sure (since my IDEs do all the config stuff for me), but i think the order of the switches also does matter for compiling and linking. did you try to move the -lfbclient_ms switch to the very end?
OS: Win XP PRO SP2 (fully updated)
proc: INTEL Core 2 Duo E6400
wx: wxDevCpp (always latest stable)
proc: INTEL Core 2 Duo E6400
wx: wxDevCpp (always latest stable)
-
- Earned a small fee
- Posts: 13
- Joined: Fri Feb 23, 2007 12:23 am
-
- Earned a small fee
- Posts: 13
- Joined: Fri Feb 23, 2007 12:23 am
I get the above errors when compiling the firebird test progs. The related related lines from FirebirdDatabaseLayer.cpp are[Linker Error] undefined reference to `fb_interpret@12'
[Linker Error] undefined reference to `fb_interpret@12'
and in Firebird2.0\include\ibase.h#if FB_API_VER==15
isc_interprete(szError, &pVector);
#else
fb_interpret(szError, 512, (const ISC_STATUS**)&pVector);
#endif
/* This const params version used in the engine and other places. */
ISC_LONG ISC_EXPORT fb_interpret(ISC_SCHAR*,
unsigned int,
const ISC_STATUS**);
If I add these lines to the databaselayer_tests.cpp
Then they no longer cause an error but are replaced by other errors such as#ifndef USE_FIREBIRD_EMBEDDED
#define USE_FIREBIRD_EMBEDDED 1
#endif
But it compiles successfully albeit with lots of warnings. Maybe I will download VC++2008 Express and try that. Only a week down the drain so far.[Warning] "SQL_FLOAT" redefined
I had the same problem.[Linker Error] undefined reference to `fb_interpret@12'
[Linker Error] undefined reference to `fb_interpret@12'
I had uninstalled Firebird 1.5 and installed Firebird 2.0, but i had forgot to copy Firebird 2.0 *.lib files into the \mylib directory of my IDE. So i was trying to link FB 1.5 *.lib files while using FB 2.0.
When i have copied FB 2.0 *.lib files into \mylib my prog launched.
I had all the libraries properly referenced and it wasn't until I built and upgraded to wxWidgets 2.8.7 that the fbinterpret@12 thingo resolved.
This happens on any new installation of wxDev-C++ I have done so I now just copy the files to Dev-Cpp's folders. I will cross the cross platform bridge when I come to it.
Cheers, John
This happens on any new installation of wxDev-C++ I have done so I now just copy the files to Dev-Cpp's folders. I will cross the cross platform bridge when I come to it.
Cheers, John