samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
Which errors do you get on building the samples?
Somthing like 'recipe for minimal.exe failed'
Well, "something failed" does not really help to identify the cause of the probelms. There must be a more specific error message. You could invoke make with a switch to enable verbose output. That could possibly help to find the cause.
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
Can you build your own applications (not using wxSQLite3) without problems?
Yes,I tried to build wx/sample/minimal,sample/opengl entired sub folder examples just by run the same batch file which build wx3.3 as mentioned above;
It's certainly a good first step to be able to compile and run the samples coming with wxWidgets. However, I meant to ask whether you can set up, compile and run your
own test application successfully.
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
to check C::B setting up with wx3.3,I test in the IDE again with minimal example,and other execises I made ,pure c++ stl console execise+wxlib linked in(No GUI);run wxMessageBoxs in a console execise to check wxPrintf output Chinese character issue;and also ,of course,running the wizard to create wxFrame based /Dialog based GUI application with wxSimth and also with wxFormBuilder.Everthing is OK.
I don't use C::B myself, so I can't help with setting up wx projects in C::B. However, you seem to have managed to do that, if all the mentioned samples work.
If building and running wxSQLite3 does not work for you, there must be a subtle difference. Usually adjusting the configuration file "config.gcc" should be enough to get things up and running.
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
To run below build test,I moved wx3--release libs to another place and just leave the debug version there for below----
wx's debug and release libs are usually located in the same directory and are distinguished by a "d" appended to the lib name. That is, it should not be necessary to move the lib files around.
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
2 hour ago I downloaded wxSqlite3.4.9.0 from github(
https://github.com/utelle/wxsqlite3),double checked system environment path,%WXWIN%,msys2-MingW64\bin path,make sure there is only this one compiler 'visible' and then try to build wxSqlite3490.This time it is so weird the compiler just complaints can not find wx/setup.h.To compare,I retried with wxSqlite3482,same error:can not find wx/setup.h.
This indicates that either the wx library path is not set up correctly, or that wx was not built for the selected configuration.
For example, the build files coming with wxSQLite3 assume that the library path for a 64-bit build contains the architecture suffix "_x64". However, the default build files coming with wxWidgets do not set this suffix automatically. This is normally not a problem for users that only build for a single architecture (32- or 64-bit, but not both). Looking at the screenshot of the directory structure, I see that the library path is
"gcc_lib", although you built for 64-bit. So, you need to adjust wxSQLite3's "config.gcc" to not use the architecture suffix for 64-bit builds. You could try the following:
Change in file "config.gcc" all lines with
to
If you are lucky, this will already do the trick.
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
Below is some basic information/configuration related to the Mingw|wx:
Code: Select all
WXWIN:E:\Learning\CodeBlocks\sdk\wx3
PATH:E:\Learning\CodeBlocks\msys64\mingw64\bin;E:\Learning\CodeBlocks\sdk\wx3\include;E:\Learning\CodeBlocks\sdk\wx3\lib\gcc_lib\mswud;
The PATH environment variable looks a bit strange. The PATH environment variable should list directories which contain executables or DLLs. However, you added directories which contain include files.
IMHO the directory "E:\Learning\CodeBlocks\sdk\wx3\include" should be dropped from PATH. And directory
"E:\Learning\CodeBlocks\sdk\wx3\lib\gcc_lib\mswud"
should be changed to
"E:\Learning\CodeBlocks\sdk\wx3\lib\gcc_lib",
because libs and DLLs are located there. The subdirectories "mswu" resp "mswud" contain include files for the compiler describing the selected configuration ("setup.h").
samsam598 wrote: ↑Sat Sep 10, 2022 1:01 am
build wxsqlite batch file:
Code: Select all
set PATH=E:\Learning\CodeBlocks\msys64\mingw64\bin;E:\Learning\CodeBlocks\sdk\wx3\include;E:\Learning\CodeBlocks\sdk\wx3\lib\gcc_lib\mswud;%PATH%
REM Build wxWidgets Static Debug configuration with C++17 support and GCC libraries linked statically
mingw32-make -f wxsqlite3_mono_debug_win64.make MONOLITHIC=1 SHARED=0 BUILD=debug CXXFLAGS="-std=c++17" LDFLAGS="-static" SHELL=cmd.exe
Again, you need to adjust the PATH environment variable as described above.
Regrads,
Ulrich