patch for 64bit wxwidgets 2.8.12 and build method

Discussion about CodeLite development process and patches
xuiv
CodeLite Enthusiast
Posts: 16
Joined: Fri Nov 22, 2013 3:21 am
Genuine User: Yes
IDE Question: c++
Contact:

patch for 64bit wxwidgets 2.8.12 and build method

Post by xuiv »

# TDM64-GCC comoile 64bit dll option
#mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x64 CPPFLAGS="-Os" LDFLAGS="-shared-libgcc -shared-libstdc++ -loleacc" CPP="gcc -E -D_M_AMD64"
#mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x64 CPPFLAGS="-Os" LDFLAGS="-shared-libgcc -shared-libstdc++ -loleacc" CPP="gcc -E -D_M_AMD64" BUILD=release
# update: 2013/Sep/10 TDM64-GCC default link libstdc++ in dynamic way
mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x64 CPPFLAGS="-Os" LDFLAGS="-shared-libgcc -loleacc" CPP="gcc -E -D_M_AMD64"
mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x64 CPPFLAGS="-Os" LDFLAGS="-shared-libgcc -loleacc" CPP="gcc -E -D_M_AMD64" BUILD=release
# TDM64-GCC comoile 32bit dll option
#mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x86 CPPFLAGS="-Os -m32" LDFLAGS="-shared-libgcc -shared-libstdc++ -m32 -loleacc" CPP="gcc -E -D_M_IX86" RCFLAGS="-F pe-i386"
#mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x86 CPPFLAGS="-Os -m32" LDFLAGS="-shared-libgcc -shared-libstdc++ -m32 -loleacc " CPP="gcc -E -D_M_IX86" RCFLAGS="-F pe-i386" BUILD=release
mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x86 CPPFLAGS="-Os -m32" LDFLAGS="-shared-libgcc -m32 -loleacc" CPP="gcc -E -D_M_IX86" RCFLAGS="-F pe-i386"
mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 USE_OPENGL=1 MONOLITHIC=1 OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x86 CPPFLAGS="-Os -m32" LDFLAGS="-shared-libgcc -m32 -loleacc" CPP="gcc -E -D_M_IX86" RCFLAGS="-F pe-i386" BUILD=release


# Build DLL lib
SHARED=1
# Use opengl support
# Notice 2.9.4 unicode is default setting, omit USE_UNICODE=1
USE_OPEGL=1
# Build multi lib into one monolithic lib
MONOLITHIC=1
# lib naming
OFFICIAL_BUILD=1 COMPILER_VERSION="" CFG=_x64
# CPPFLAGS is used both for gcc and g++, put shared option in CPPFLAGS
# -m32 options is needed to build 32bit, during compile and link time
# In GCC document -Os use -O2 optimize setting
# And add extra code size optimize setting
# Since release build default optimize is use -O2
# Used -Os in debug build seems get same result like release build ?
CPPFLAGS="-Os -m32"
# TDM64-GCC uses a statically-linked libstdc++ and libgcc by default
# Not requiring extra DLLs: like libgcc.dll to redistribute with program.
# However, the program size is fat, I prefer use dynamic linking
# link oleacc.lib because I used windows accessibility provided by wxWidget
LDFLAGS="-shared-libgcc -shared-libstdc++ -loleacc -m32"
# use -D option defined different platform _M_AMD64 for 64bit or _M_IX86 for 32bit
# Is this mandatory ?
CPP="gcc -E -D_M_AMD64"
# While building dll will use windres to generate resource file
# But it not build correct resource file
# This caused error like this "bin/ld.exe: i386:x86-64 architecture of input file `gcc_mswuddll32\basedll_ver
# sion_rc.o' is incompatible with i386 output"
# Use RCFLAGS let windres generate right target platform
# RCFLAGS is not defined in wxWigets config.gcc and makefile.gcc
# Need to patch it byself
RCFLAGS="-F pe-i386"

patch config.gcc 和 makefile.gcc

# How to pathc patch build\msw config.gcc and makefile.gcc byself
# patch config.gcc
# add the following code in last line in config.gcc
RCFLAGS ?=
# patch makefile.gcc
# search all string "windres --use-temp-file -i$< -o$@ " in makefile.gcc
# replace with the following code
windres --use-temp-file -i$< -o$@ $(RCFLAGS)
# Notice: want build wxWidgets samples in sample folder need patch all makfile.gcc in subfolder

wxWidgets-2.8.12-x64.patch
You do not have the required permissions to view the files attached to this post.