Author Topic: Custom Variables  (Read 2115 times)

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Custom Variables
« on: July 21, 2023, 07:04:22 pm »
i can recall two of the three custom variables used when building 64 bit projects. What custom variable can't I recall? The two variables that I recall are WX_SUFFIX and WX_CFG, which are set to "u" and "64" respectfully.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Custom Variables
« Reply #1 on: July 21, 2023, 08:10:19 pm »
WX_VERSION is 32
WX_CFG is normally a empty string; but, it depends on how the wxWidgets was built.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: Custom Variables
« Reply #2 on: July 21, 2023, 08:28:18 pm »
@stahta01:
That's the missing custom variable!

Thanks Tim

Offline everSome

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: Custom Variables
« Reply #3 on: August 05, 2023, 07:30:58 pm »
I just recompiled wxWidgets 3.2.2.1 and CodeBlocks r13320 with GCC 13.2 to make sure everything still works as expected, which it does. Note that I'm running on a Windows 10 system with MSYS2 packaged development software installed.

When I compile wxWidgets, I get .dll files placed in my directory:
C:\msys64\home\YourName\wxWidgets\normal\wxWidgets-3.2.2.1\lib\gcc_dll

As I just use:
C:\msys64\home\YourName\wxWidgets\normal\wxWidgets-3.2.2.1\build\msw\mingw32-make -f makefile.gcc
I only get files generated in the aforementioned gcc_dll directory.

As I basically use a form of codeblocks-code-r13320-trunk\src\CodeBlocks_wx32_64.cbp
wherein:
<Environment>
   <Variable name="WX_CFG" value="" />
   <Variable name="WX_SUFFIX" value="u" />
   <Variable name="WX_VERSION" value="32" />
</Environment>
I've never had to figure out what I'd have to do to support a non-null value for WX_CFG.

From the Project build options Search directories entry:
$(#WX32_64.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)
it seems CodeBlocks expects WX_CFG to be used as a suffix to the aforementioned gcc_dll directory name.

FYI, a WX_SUFFIX value of u indicates that wxWidgets was built with Unicode support, which it seems has been the default for a while now. If I remember correctly, they don't recommend one build without such support anymore.
Note that a WX_SUFFIX value of d indicates that this is a debug version, which I force to generate ggdb3 support.

I use the following commands:
time mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 USE_OPENGL=0 BUILD=release -j8
time mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 USE_OPENGL=0 BUILD=debug -j8
to generate:
wxmsw32u_gcc_custom.dll
wxmsw32ud_gcc_custom.dll
respectively.

To get CodeBlocks to use a debug version of wxWidgeets, I just run the command:
find . -name '*32_64.cbp' -exec sed -i 's/name="WX_SUFFIX" value="u"/name="WX_SUFFIX" value="ud"/' {} \;

Note that makefile.gcc by default also caused two other .dll files witch CodeBlocks does not utilize when compiled with *32_64.cbp files. I think these file names are prefixed with something like wxgtk3, but I've suppressed their generation for quite a while now; so, my memory of that is a little hazy at this point. This suppression is caused by the:
USE_OPENGL=0
option as used above.

As for WX_VERSION values, 3 and 2 are respectively the major and minor release numbers i.e., the first two numbers in "3.2.2.1".