wxDatabase and WXwidget 3.0.5
Closed this issue · 26 comments
I'm trying to build wxDatabase for the MinGW compiler. Below is the build log with an error. what am I doing wrong? Thank you all in advance for your help!
c:\Library\wxDatabase\build>mingw32-make -f makefile WX_SHARED=1 WX_MONOLITHIC=1 WX_UNICODE=1 WX_DEBUG=0 WX_DIR="c:\Library\wxwidgets" [ 5%] Building CXX object CMakeFiles/wxdatabase.dir/src/base/dbconf.cpp.obj [ 10%] Building CXX object CMakeFiles/wxdatabase.dir/src/base/wxprec.cpp.obj [ 15%] Building CXX object CMakeFiles/wxdatabase.dir/src/base/xmlconf.cpp.obj [ 21%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/database.cpp.obj [ 26%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/error_reporter.cpp.obj [ 31%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/prepared_statement.cpp.obj [ 36%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/query_parser.cpp.obj [ 42%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/resultset.cpp.obj [ 47%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/string_converter.cpp.obj [ 52%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/wxprec.cpp.obj [ 57%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/odbc/odbc_database.cpp.obj [ 63%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/odbc/odbc_inteface.cpp.obj [ 68%] Building CXX object CMakeFiles/wxdatabase.dir/src/database/odbc/odbc_param.cpp.obj C:\Library\wxDatabase\src\database\odbc\odbc_param.cpp: In member function 'SQLLEN* wxOdbcParameter::GetParameterLengthPtr()': C:\Library\wxDatabase\src\database\odbc\odbc_param.cpp:255:11: error: cannot convert 'long int*' to 'SQLLEN*' {aka 'long long int*'} in return return &m_nBufferLength; ^~~~~~~~~~~~~~~ mingw32-make[2]: *** [CMakeFiles\wxdatabase.dir\build.make:256: CMakeFiles/wxdatabase.dir/src/database/odbc/odbc_param.cpp.obj] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:84: CMakeFiles/wxdatabase.dir/all] Error 2 mingw32-make: *** [makefile:135: all] Error 2
Hi Melandr,
can you provide few more details:
- What libraries do you want wxDatabse to support? MySQL? Postgres? ODBC?
- How did you generate Makefile from CMake?
- Which version of MingW did you use and link to download it if you remember it
I will appreciate if you can find time to document exactly the steps you took so that it will be easy to test and fix.
Thank you for using wxDatabase
Добрый день!
- Какие библиотеки должен поддерживать wxDatabse? MySQL? Постгрес? ODBC?
Собирал для ODBC, но думаю может стоит добавить MySql и Sqllite. В первую очередь необходимо сделать подключение к MS SQL (следовательно ODBC)- Как вы создали Makefile из CMake?
Makefile создавал через Cmake gui for Windows
- Какую версию MingW вы использовали, и ссылку для ее загрузки, если вы ее помните
MinGW ставил вместе с CodeBlocks
https://sourceforge.net/projects/codeblocks/files/latest/download
Hi, unfortunately do not know Russians. I will try to follow screenshots/Google translate and see where the issue is but if you can write in english it will be great!
Since you want to use MSSQL, did you check FreeTDS.
It is supported by wxDatabase thanks to @manyleaves
Since the library doesn't even build, I will have to fix that!
wxWidgets 3.0.5 (7zip)
Cmake: 3.22 rc2
MinGW: TDM: tdm64-gcc-10.3.0-2
Building wxWidgets
- cd wxWidgetDir/build/msw
- Run
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
(Note you can put release instead of debug) - Once build is done, go to CMake gui. Source coude should point to wxDatabase root (eg
C:/Libraries/wxDatabase
) and build to its build folder (eg.C:/Libraries/wxDatabase/build
) - In your CMake GUI, click environment and add entry. Add
WXWIN
value should point to your wxWidgets. Then add it - AFTER wxWidgets IS DONE BUILDING, Click Configure. All should be well, and should get message like this ``Found wxWidgets: C:/wxWidgets-3.0.5/lib/gcc_dll/libwxmsw30ud_core.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxbase30ud.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxpngd.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxtiffd.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxjpegd.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxzlibd.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxregexud.a;C:/wxWidgets-3.0.5/lib/gcc_dll/libwxexpatd.a;winmm;comctl32;uuid;oleacc;uxtheme;rpcrt4;shlwapi;version;wsock32 (found version "3.0.5") found components: core base png tiff jpeg zlib regex expat
Configuring done``` - Click generate and should have message saying
Generating done
. In your build directory there should be build files generated. - Then move to where make file was generated i.e build directory and run this command
mingw32-make
It should build fine then
Note: You must update to the latest master.
I would be happy to see feedback from your usage and any issue you encounter
For ODBC with Windows you do not download anything. WIndows servers I believe comes with ODBC drivers.
MySQL - MySQL ODBC driver if you want to use ODBC. But if you install MariaDB connector C it should work fine
SQLite comes bundled. Just enable it in the CMake file and enjoy the music
Note: SQLite bundled is not the latest but I plan to update it in foreseeable future!
Hi Melandr,
the wxMediaCtrl error is indeed issue in wxWidgets. You can see suggested fix in wxWidgets forum. Just copy that error and paste on the forum to see thread about it and suggestion by DoubleMax to fix it. I don't have time to search it right now.
Take a look at the error being thrown. long int is 4 bytes, and SQLLEN on a
64 bit system is 8 bytes. Therefore, there is no implicit conversion of a
4-byte pointer to an 8-byte pointer.
You surely didn't update to latest version. Make sure you update your local copy to match latest version with a fix
run:git pull --rebase
And another question, which version of wxWidgets would you recommend
building - 3.0.5 or 3.1.5?
If you have no constraints in your project, I suggest you with the latest development, which is 3.1.5
If you project will be release some future time like 1yr later, I suggest you use latest master trunk
Did you resolve your problem?
Glad that your issue was resolved!
Please if you find anything not working, don't hesitate to open an issu, PR or both.
Wish you success!
Can you open new issue if there is something else?
Also Github does not show images that you send by replying email.
Writing reply directly to Github will be best way to solve that!