Compilation of libwxcode_msw28d_databaselayer_firebird.a went smoothly.
I just used the command line command:
mingw32-make -f makefile.gcc firebird
Then I tried to make compilation of examples:
mingw32-make -f makefile.gcc firebird_test
I produced a lot of errors like:
undefined reference to `_isc_attach_database@24'
I created fbclient.a by the following:
reimp -d fbclient_ms.lib
-k --input-def fbclient.def --dllname fbclient.dll --output-lib fbclient.a
So I put fbclient.a, fbclient.def, fbclient.dll into appropriate paths.
But I still getting many "undefined reference " errors.
Maybe order list of libs for DatabaseLayer is wrong.
Then I created a simple C file to try to compile it with minimum info:
Code: Select all
#include <iostream>
#include "ibase.h"
using namespace std;
int main (int argc, char *argv[])
{
isc_db_handle m_pDatabase;
ISC_STATUS_ARRAY m_Status;
short nDpbLength = 0;
char* pDpb;
char* urlBuffer;
//isc_version(
isc_attach_database(m_Status, 0, urlBuffer, &m_pDatabase, nDpbLength, pDpb);
cout << "Hello World!" << endl;
cout << "Press ENTER to continue..." << endl;
cin.get();
return 0;
}
File can be compiled fine with the command:
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D_DEBUG -I"C:\Program Files\Firebird\Firebird_2_5\include" -c main.cpp -o main.o
Then I get the same error undefined reference to `_isc_attach_database@24' when linking the file with the command:
mingw32-g++.exe main.o -o main.exe -L"C:\Program Files\Firebird\Firebird_2_5\lib" -L"C:\Program Files\Firebird\Firebird_2_5\bin" -lrpcrt4 -lwinmm -lws2_32 -lwldap32 -luser32 -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lfbclient
What could be wrong?
Finally I cannot use libwxcode_msw28d_databaselayer_firebird.a in my WX application because I am having the same linking problems.