Install wxwidgets & wxsqlite3

Notes for installing wxwidgets & wxsqlite3 on windows with mingw – code::blocks.

install codeblock (not with mingw)
install mingw (C:\MinGW)
install wxMSW from svn http://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_9_1
get makefile.gcc from trunk (svn)
uninstall winavr path (is you use it)

-----------------------------------------------
ENV VARS

WXWIN = C:\wx29x\
PATH = C:\MinGW\bin;

-----------------------------------------------
COMPILATION OF WXWIDGETS

CD wx\wx292\build\msw

for dual processor:
add -j2

FOR DLL LINKING:

mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_XRC=1 BUILD=debug clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_XRC=1 BUILD=debug
OR - AND
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_XRC=1 BUILD=release clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_XRC=1 BUILD=release

code::blocks options will be:


FOR STATIC LINKING:
not recommended for wxsqlite3 if you don't want to compile sqlite

mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 USE_XRC=1 BUILD=debug clean
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 USE_XRC=1 BUILD=debug
OR - AND
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 USE_XRC=1 BUILD=release clean
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 USE_XRC=1 BUILD=release

code::blocks options will be:


(TO BUILD the samples use the same command as above)

-----------------------------------------------
CODEBLOCKS COMPILE OPTIONS FOR WXWIDGETS APP

:::STATIC:::
REMOVE the required .dll (something with mingw) by removing -mthread in gcc compiler option

when compiling for STATIC linking
add libjpeg and libtiff in the list of include static lib

-----------------------------------------------
SQLITE3

install from svn wxsqlite3
https://wxcode.svn.sourceforge.net/svnroot/wxcode/trunk/wxCode/components/wxsqlite3

configure makefile.gcc (wxsqlite/build):
ONLY SHARED DLL, if you want to build static version you need to compile sqlite (using the SQLite amalgamation source code)
run time load dll might not be the best if you application is always using sqlite3

build:
mingw32-make -f makefile.gcc
test samples/minimal.exe

now not sure about this step:
REDO EACH TIME YOU RECOMPILE
copy wxsqlite3\include to wx291\include
copy libwxcode_msw29ud_wxsqlite3.a - .dll wx291\lib\gcc_dll

you will need for your application:
wxcode_msw29ud_wxsqlite3.dll
wxmsw292ud_gcc_custom.dll
sqlite3.dll

in CB:
add libwxcode_msw29ud_wxsqlite3.a in LINKER

-----------------------------------------------
USING XRC WITH WXSMITH

create new project with wxSmith, Frame based
in Resources delete (nameofproject)Frame (right click - delete)
check too delete source files from project & physically delete source files
wxSmith -> Add wxFRame -> check XRC & autoload
wxSmith -> configure -> Main resource: your new created wxframe
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s