User forums > Help
Can`t build C::B IDE from latest svn revision 12240
omlk:
OS: Windows 7 64bit
1) install MSYS2 https://www.msys2.org/
- run msys2-terminal and run for update all packages (if need)
--- Code: --- $pacman -Syu
--- End code ---
- run msys2-terminal and run to install packages:
--- Code: --- $pacman -S mingw-w64-x86_64-gdb mingw-w64-x86_64-gcc mingw-w64-x86_64-boost zip svn
--- End code ---
2) download latest wxWidgets-3.1.4 from https://www.wxwidgets.org/downloads/
- if use wget.exe
--- Code: --- wget.exe -P "h:\i\CB_src\s\" "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.zip" -N --compression=auto -l 16 -t 0 --retry-connrefused -e robots=off -np -x --max-redirect=60 --no-if-modified-since -o "wget_wx.log"
--- End code ---
3) download latest C::B IDE src from https://svn.code.sf.net/p/codeblocks/code/trunk/
- if use wget.exe [more bad idea for more download files]
--- Code: --- wget.exe -P "h:\i\CB_src\s\" "http://svn.code.sf.net/p/codeblocks/code/trunk/" -N -r --compression=auto -l 16 -t 0 --retry-connrefused -e robots=off -np -x --max-redirect=60 --no-if-modified-since -o "wget_cb.log"
--- End code ---
- use svn.exe, before start need open in your system firewall ports only svn.exe uotput rules TCP 80,443,3690
--- Code: --- svn.exe co --username you svn://svn.code.sf.net/p/codeblocks/code/trunk
--- End code ---
4) compile wxWidgets
4.1) create powershell file: I.ps1
--- Code: --- chcp 65001
#$path_msys32 = "H:/I/msys32" ## <== change whereis MSYS2 save files
$path_msys64 = "H:/I/msys64" ## <== change whereis MSYS2 save files
$path_wx = "H:/I/CB_src/wxgtk" ## <== change whereis saved latest unpacked wxWidgets files
cd ($path_wx + "/build/msw")
##-- 32 bit
# $path_mingw32="$path_msys32/mingw32"
# $env:path +=";" + $path_mingw32
# $env:path +=";$path_mingw32\bin"
# $env:path +=";$path_mingw32\include"
##-- 64 bit
$path_mingw64="$path_msys64/mingw64"
$env:path +=";" + $path_mingw64
$env:path +=";$path_mingw64\bin"
$env:path +=";$path_mingw64\include"
#-- Before compile I change params in $path_wx/build/msw/config.gcc
#-- add _MSC_VER=1928 for enable direct2D but this not work
#-- need run if rebuild
mingw32-make -f makefile.gcc clean
if(Test-Path -PathType Container "$path_wx\lib\gcc_dll") {
#del "$path_wx\lib\gcc_dll"
rm -r -fo "$path_wx\lib\gcc_dll"
}
echo "`n-----------------------------------------------`n"
#-- need run once before compile
mingw32-make -f makefile.gcc setup_h
echo "`n-----------------------------------------------`n"
#-- build all wxWidgets
#-- recommends for arg -j#:
#-- -j(cores in CPU / 2) if cores >= 4
#-- not use this arg if cores >= 2
#mingw32-make -j4 -f makefile.gcc
mingw32-make -j2 -f makefile.gcc
echo "`n-----------------------------------------------`n"
#-- need if not found zip.exe in Windows
#$path_system32 = $env:ComSpec
#$path_system32 = $path_system32.SubString(0, $path_system32.Length-7)
#cd $path_system32
#$creds = Get-Credential
$arg = "/c" +
"mklink zip.exe $path_msys64\usr\bin\zip.exe" +
"& mklink msys-2.0.dll $path_msys64\usr\bin\msys-2.0.dll" +
"& mklink msys-bz2-1.dll $path_msys64\usr\bin\msys-bz2-1.dll"
Start-Process cmd -ArgumentList $arg -Verb runas
echo "`n-----------------------------------------------`n"
--- End code ---
4.2) Need change file: H:\I\CB_src\wxgtk\include\wx\msw\setup.h
from
#define wxUSE_GRAPHICS_DIRECT2D 0
to in the #else case as well.
#define wxUSE_GRAPHICS_DIRECT2D 1
4.3) run compile:
click double on I.ps1
5) run current C::B IDE
5.1) Open workspace file
## 32 bit
#- open file in C::B IDE: "H:\I\CB_src\s\svn.code.sf.net\p\codeblocks\code\trunk\src\CodeBlocks_wx31.workspace"
## OR
## 64 bit
- open file in C::B IDE: "H:\I\CB_src\s\svn.code.sf.net\p\codeblocks\code\trunk\src\CodeBlocks_wx31_64.workspace"
5.2) take button build or rebuild
and look this ERRORS :)
https://ibb.co/Xz44qHc
https://ibb.co/bLLtpcj
https://ibb.co/MhxWvrn
https://ibb.co/4pDmnDy
https://ibb.co/xgzdR0k
expired 30 days https://easyupload.io/m/m3o8cv
sodev:
CodeBlocks requires a monolithic DLL version of wxWidgets, not sure what the Makefile compiles by default with no parameters specified, since your errors are linker errors it most probably builds another variant.
Adding _MSC_VER as parameter to Make does NOT pass this as define to the compiler but just sets this as environment variable, thats why it doesn't have any effect. A better way is really to modify setup.h to get the required settings.
omlk:
my config.gcc containe:
--- Code: ---# =========================================================================
# This configuration file was generated by
# Bakefile 0.2.12 (http://www.bakefile.org)
# Beware that all changes made to this file will be overwritten next
# time you run Bakefile!
# =========================================================================
# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------
_MSC_VER = 1928
# Compiler flags to link shared library
LINK_DLL_FLAGS ?= -shared
# Compiler flags to link loadable module
LINK_MODULE_FLAGS ?= -shared
# C compiler
CC = gcc
# C++ compiler
CXX = g++
# Standard flags for CC
CFLAGS ?=
# Standard flags for C++
CXXFLAGS ?=
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?=
# Standard linker flags
LDFLAGS ?=
# The C preprocessor
CPP ?= $(CC) -E
# What type of library to build? [0,1]
SHARED ?= 1
# GTK+ toolkit version [,2]
TOOLKIT_VERSION ?=
# Build wxUniversal instead of native port? [0,1]
WXUNIV ?= 0
# Compile Unicode build of wxWidgets? [0,1]
UNICODE ?= 1
# Type of compiled binaries [debug,release]
BUILD ?= release
# Should debugging info be included in the executables? The default value
# "default" means that debug info will be included if BUILD=debug
# and not included if BUILD=release. [0,1,default]
DEBUG_INFO ?= default
# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all
# but expensive assert checks are enabled, use 0 to completely remove debugging
# code. [0,1,default]
DEBUG_FLAG ?= 1
# Multiple libraries or single huge monolithic one? [0,1]
MONOLITHIC ?= 1
# Build GUI libraries? [0,1]
USE_GUI ?= 1
# Build wxHTML library (USE_GUI must be 1)? [0,1]
USE_HTML ?= 1
# Build wxWebView library (USE_GUI must be 1)? [0,1]
USE_WEBVIEW ?= 1
# Build multimedia library (USE_GUI must be 1)? [0,1]
USE_MEDIA ?= 1
# Build wxXRC library (USE_GUI must be 1)? [0,1]
USE_XRC ?= 1
# Build wxAUI library (USE_GUI must be 1)? [0,1]
USE_AUI ?= 1
# Build wxRibbon library (USE_GUI must be 1)? [0,1]
USE_RIBBON ?= 1
# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1]
USE_PROPGRID ?= 1
# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1]
USE_RICHTEXT ?= 1
# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1]
USE_STC ?= 1
# Build OpenGL canvas library (USE_GUI must be 1)? [0,1]
USE_OPENGL ?= 1
# Build quality assurance classes library (USE_GUI must be 1)? [0,1]
USE_QA ?= 1
# Enable exceptions in compiled code. [0,1]
USE_EXCEPTIONS ?= 1
# Enable run-time type information (RTTI) in compiled code. [0,1]
USE_RTTI ?= 1
# Set DPI Awareness (win32) to none, system or per-monitor. [0,1,2]
USE_DPI_AWARE_MANIFEST ?= 2
# Enable threading in compiled code. [0,1]
USE_THREADS ?= 1
# Enable wxCairoContext for platforms other than Linux/GTK. [0,1]
USE_CAIRO ?= 0
# Is this official build by wxWidgets developers? [0,1]
OFFICIAL_BUILD ?= 0
# Use this to name your customized DLLs differently
VENDOR ?= omlk
#
WX_FLAVOUR ?=
#
WX_LIB_FLAVOUR ?=
# Name of your custom configuration. This affects directory
# where object files are stored as well as the location of
# compiled .lib files and setup.h under the lib/ toplevel directory.
CFG ?=
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
RUNTIME_LIBS ?= dynamic
# Set the version of your Mingw installation here.
# "3" ...... this is for Mingw 2.0 or newer (comes with gcc3)
# "2.95" ... for Mingw 1.1 or any of the older versions [3,2.95]
GCC_VERSION ?= 3
# Windows resource compiler to use, possibly including extra options.
# For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build.
WINDRES ?= windres
--- End code ---
sodev:
Great, now all you have to do is to reverse engineer all these generated Makefiles to figure out how to actually pass this definition to all required compiler calls as define.
omlk:
--- Quote from: sodev on December 19, 2020, 06:22:56 pm ---Great, now all you have to do is to reverse engineer all these generated Makefiles to figure out how to actually pass this definition to all required compiler calls as define.
--- End quote ---
? mingw32-make -j2 -f makefile.gcc in file #include config.gcc
Navigation
[0] Message Index
[#] Next page
Go to full version