Author Topic: SVN 12550 does not compile  (Read 18858 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: SVN 12550 does not compile
« Reply #30 on: December 13, 2021, 06:03:43 am »
Ollybdg,

When I build WxWidget I do not specify the following parameters
    USE_XRC=1
    USE_OPENGL=1
    CXXFLAGS="-Wno-unused-local-typedefs -Wno-deprecated-declarations -fno-keep-inline-dllexport"

The WIKI page ("https://wiki.codeblocks.org/index.php/Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)")  has the following options:
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport" >log.txt 2>&1
The codeblocks manual appears to not be up to date as the command line options specified on pages 133 & top of 134 do not specif the VENDOR=cb option!!!
The  https://github.com/PBfordev/wxpbguide is different again...

So my question if you get this far is what should the wxWidget options be in order to build WxWidget with the same options as included in the official C::B releases?

If I remember correctly, those two options: "-Wno-unused-local-typedefs -Wno-deprecated-declarations" is used to suppress a lot of warning when building the wx library. I use those two options years ago.

"-fno-keep-inline-dllexport" option is to avoid a gcc bug that if this option is not added, the gcc may crash? (this option is added many years ago, I just can't remember).

"USE_OPENGL=1" this option is that I want the result wx library can have OpenGL support.

"USE_XRC=1" this option maybe not necessary, that maybe it is enabled by default.

I remembered that for building C::B against wx, the wx should have the Direct2D enabled, which I need to manually edit a file in the wx source.


Quote
So my question if you get this far is what should the wxWidget options be in order to build WxWidget with the same options as included in the official C::B releases?
No, those options are only used when building wx library. For building C::B, I just use the *.cbp or *.workspaces file supplied by C::B source.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: SVN 12550 does not compile
« Reply #31 on: December 13, 2021, 08:49:29 am »
Sorry, the WxWidget question is what options are used to build the WxWidget's DLL's that are part of the official C::B release.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: SVN 12550 does not compile
« Reply #32 on: December 13, 2021, 08:55:21 am »
Sorry, the WxWidget question is what options are used to build the WxWidget's DLL's that are part of the official C::B release.

You may ask killerbot to answer this question. Because he is the author of the nightly build of C::B and the official windows release of C::B.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: SVN 12550 does not compile
« Reply #33 on: December 13, 2021, 09:51:46 am »
He told it in this post

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: SVN 12550 does not compile
« Reply #34 on: December 13, 2021, 10:09:15 am »
@Miguel Thanks for the link. I will need to update my build script to add the CXXFLAGS+="-std=c++11" in order to be the same.