When building on CYGWIN, I got this error:
CXX windowsxplooknfeel.lo In file included from ../../../../trunk/src/plugins/xpmanifest/windowsxplooknfeel.cpp:25: ../../../../trunk/src/plugins/xpmanifest/windowsxplooknfeel.h:12:6: error: #error This plugin is for use under Win32 only! 12 | #error This plugin is for use under Win32 only! | ^~~~~ make[3]: *** [Makefile:502: windowsxplooknfeel.lo] Errore 1
Actually, the xpmanifest plugin is enabled here also for CYGWIN:
https://sourceforge.net/p/codeblocks/code/HEAD/tree/trunk/m4/acinclude.m4
but here:
only __WXMSW__
is expected, otherwise that error will be signaled.
Actually, these two things cannot coexist: cygwin must be removed from m4/acinclude.m4
or __CYGWIN__
must be enabled inside windowsxplooknfeel.h
, otherwise it will never build.
Since CYGWIN is able to build this code, I did this tiny patch to the code:
Index: src/plugins/xpmanifest/windowsxplooknfeel.h =================================================================== --- src/plugins/xpmanifest/windowsxplooknfeel.h (revisione 12687) +++ src/plugins/xpmanifest/windowsxplooknfeel.h (copia di lavoro) @@ -8,7 +8,7 @@ #include "cbplugin.h" // the base class we 're inheriting -#ifndef __WXMSW__ +#if !defined __WXMSW__ && !defined __CYGWIN__ #error This plugin is for use under Win32 only! #endif
I hope that you will find this report useful.
Have you looked at the rest of the code for where WXMSW is used to see if under Windows for wxWidgets you need this defined? Does the resulting build in the devel31 directory run successfully and work without glitches/crashes etc?
Also can you create a patch and add it to a followup post as per the following WIKI entry:
http://wiki.codeblocks.org/index.php/Creating_a_patch_to_submit_(Patch_Tracker)
BTW I have not tried to build CB using Cygwin, but have supplied patches to get the Cygwin debugger working.
Below is info on defines that may be of some use depending on how familiar you are with the different PC GCC compilers and also defines:
When working with defines with GCC on a PC in order to ensure that the change works with other PC based GCC systems (Cygwin, MinGW, TDM etc etc) you can look at one of the following pages to get the appropriate define to use:
https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html
https://renenyffenegger.ch/notes/development/languages/C-C-plus-plus/preprocessor/macros/predefined/environment
The main pre processeor defines that I have used in the past are:
CYGWIN
_WIN32 (and WIN32 on some systems)
_WIN64 (and WIN64 on some systems)
MINGW32
MINGW64
linux
GNUC
_MSC_VER
There are others that I have used from time to time, but these make up say 98% of the uses.