Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Problem compìling after r11701 (related to Direct2D)
oBFusCATed:
--- Quote from: ollydbg on May 20, 2019, 04:48:04 pm ---Do you mean that I have to use MinGW-w64's gcc 8.1 and above?
I have only gcc 7.2 at hand.
--- End quote ---
You have to use a compiler which has the direct2d headers/libs or you have to manually comment the enforcing code in local builds.
Pecan:
--- Quote from: oBFusCATed on May 20, 2019, 10:31:13 pm ---
--- Quote from: ollydbg on May 20, 2019, 04:48:04 pm ---Do you mean that I have to use MinGW-w64's gcc 8.1 and above?
I have only gcc 7.2 at hand.
--- End quote ---
You have to use a compiler which has the direct2d headers/libs or you have to manually comment the enforcing code in local builds.
--- End quote ---
I'm using mingw810_64seh> gcc.exe --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Could you please tell us what we have to do to get around this problem.
I don't understand the comment above. What does "comment the enforcing code" mean? And where would that be?
The setup.h for wxWidgets 3.1.1 here is:
--- Code: ---// Enable wxGraphicsContext and related classes for a modern 2D drawing API.
//
// Default is 1 except if you're using a compiler without support for GDI+
// under MSW, i.e. gdiplus.h and related headers (MSVC and MinGW >= 4.8 are
// known to have them). For other compilers (e.g. older mingw32) you may need
// to install the headers (and just the headers) yourself. If you do, change
// the setting below manually.
//
// Recommended setting: 1 if supported by the compilation environment
// Notice that we can't use wxCHECK_VISUALC_VERSION() nor wxCHECK_GCC_VERSION()
// here as this file is included from wx/platform.h before they're defined.
#if defined(_MSC_VER) || \
(defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
#define wxUSE_GRAPHICS_CONTEXT 1
#else
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
#define wxUSE_GRAPHICS_CONTEXT 0
#endif
...further down....
/* --- end common options --- */
/* --- start MSW options --- */
// ----------------------------------------------------------------------------
// Graphics backends choices for Windows
// ----------------------------------------------------------------------------
// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1.
// Enable support for GDI+-based implementation of wxGraphicsContext.
//
// Default is 1.
//
// Recommended setting: 1 if you need to support XP, as Direct2D is not
// available there.
#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT
// Enable support for Direct2D-based implementation of wxGraphicsContext.
//
// Default is 1 for compilers which support it, i.e. VC10+ currently. If you
// use an earlier MSVC version or another compiler and installed the necessary
// SDK components manually, you need to change this setting.
//
// Recommended setting: 1 for faster and better quality graphics under Windows
// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier
// systems will fall back on using GDI+).
#if defined(_MSC_VER) && _MSC_VER >= 1600
#define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
#else
#define wxUSE_GRAPHICS_DIRECT2D 0
#endif
--- End code ---
But I still get the problem.
stahta01:
--- Code: ---#define wxUSE_GRAPHICS_DIRECT2D 0
--- End code ---
The above likely needs to
--- Code: ---#define wxUSE_GRAPHICS_DIRECT2D 1
--- End code ---
Tim S.
Pecan:
The error is caused by the line 34 in PlatWX.cpp
--- Code: ---#if defined(__WXMSW__) && wxUSE_GRAPHICS_DIRECT2D
--- End code ---
adding "defined()" around wxUSE_GRAPHICS_DIRECT2D solves this problem and gets me further.
eg.
--- Code: ---#if defined(__WXMSW__) && defined(wxUSE_GRAPHICS_DIRECT2D)
--- End code ---
Pecan:
Now I'm getting pummeled with errors from PlatWx that I don't understand:
--- Code: ---||=== Build: scintilla in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler) ===|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In member function 'virtual void Font::Create(const FontParameters&)':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|203|error: expected type-specifier before 'SurfaceFontDataD2D'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|782|error: 'SurfaceFontDataD2D' does not name a type; did you mean 'SurfaceData'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|869|error: 'SurfaceFontDataD2D' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|869|error: non-member function 'bool Initialised()' cannot have cv-qualifier|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In function 'bool Initialised()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|871|error: 'm_pTextFormat' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|871|note: suggested alternative: 'GetTimeFormat'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|877|error: 'SurfaceDataD2D' does not name a type; did you mean 'SurfaceData'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|911|error: 'SurfaceDataD2D' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|911|error: non-member function 'bool Initialised()' cannot have cv-qualifier|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|911|error: redefinition of 'bool Initialised()'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|869|note: 'bool Initialised()' previously defined here|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In function 'bool Initialised()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|913|error: 'm_pD2DFactory' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|913|note: suggested alternative: 'wxDCFactory'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|913|error: 'm_pDWriteFactory' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|913|note: suggested alternative: 'IID_ITypeFactory'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|916|error: 'SurfaceDataD2D' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In function 'void DiscardGraphicsResources()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|918|error: 'm_pRenderTarget' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|919|error: 'm_pSolidBrush' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|919|note: suggested alternative: 'CreateSolidBrush'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|920|error: 'm_pPatternBrush' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|920|note: suggested alternative: 'CreatePatternBrush'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|923|error: 'SurfaceDataD2D' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In function 'HRESULT CreateGraphicsResources()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|926|error: 'm_pRenderTarget' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|928|error: 'D2D1_RENDER_TARGET_PROPERTIES' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|934|error: 'm_pD2DFactory' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|934|note: suggested alternative: 'wxDCFactory'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|935|error: 'renderTargetProperties' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|935|note: suggested alternative: 'PrinterProperties'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|940|error: 'D2D1_COLOR_F' does not name a type; did you mean 'DM_COLOR'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|941|error: 'color' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|941|error: 'm_pSolidBrush' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|941|note: suggested alternative: 'CreateSolidBrush'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|946|error: 'D2D1_BITMAP_BRUSH_PROPERTIES' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|error: 'wxCOMPtr' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|note: suggested alternative: 'wxCOPY'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|error: 'ID2D1Bitmap' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|note: suggested alternative: 'LoadBitmap'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|error: 'bitmap' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|951|note: suggested alternative: 'wxBitmap'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|953|error: 'D2D1_PIXEL_FORMAT' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|953|note: suggested alternative: 'EMR_PIXELFORMAT'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|958|error: 'D2D1' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|959|error: 'D2D1' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|959|error: 'pixel_format' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|959|note: suggested alternative: 'wxPixelFormat'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|962|error: 'brushProperties' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|962|note: suggested alternative: 'EdgeProperties'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|963|error: 'm_pPatternBrush' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|963|note: suggested alternative: 'CreatePatternBrush'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|969|error: 'SurfaceDataD2D' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In function 'void SetEditorPaintAbandoned()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|971|error: 'm_editor' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|971|note: suggested alternative: 'Editor'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1066|error: 'wxCOMPtr' does not name a type; did you mean 'wxCOPY'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1067|error: 'wxCOMPtr' does not name a type; did you mean 'wxCOPY'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1068|error: 'wxCOMPtr' does not name a type; did you mean 'wxCOPY'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1069|error: 'wxCOMPtr' does not name a type; did you mean 'wxCOPY'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1070|error: 'wxCOMPtr' does not name a type; did you mean 'wxCOPY'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1072|error: 'SurfaceDataD2D' does not name a type; did you mean 'SurfaceData'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In constructor 'SurfaceD2D::SurfaceD2D()':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1077|error: class 'SurfaceD2D' does not have any field named 'm_pDWriteFactory'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1077|error: '::wxDWriteFactory' has not been declared|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1077|note: suggested alternative: 'wxDCFactory'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1092|error: 'm_surfaceData' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1092|note: suggested alternative: 'SurfaceData'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp||In member function 'virtual void SurfaceD2D::Init(SurfaceID, WindowID)':|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: 'm_surfaceData' was not declared in this scope|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|note: suggested alternative: 'SurfaceData'|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: 'SurfaceDataD2D' does not name a type; did you mean 'SurfaceData'?|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: expected '>' before '*' token|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: expected '(' before '*' token|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: expected primary-expression before '>' token|
C:\usr\Proj\cbBeta31\trunk\src\sdk\wxscintilla\src\PlatWX.cpp|1125|error: expected ')' before ';' token|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 13 second(s)) ===|
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version