New 3.1.7 install build, sample 'secretstore' fails Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
DaveNadler
Experienced Solver
Experienced Solver
Posts: 53
Joined: Thu Nov 17, 2011 2:13 pm

New 3.1.7 install build, sample 'secretstore' fails

Post by DaveNadler »

Hi All - Wondering if I've done something wrong or this is a known problem.
Windows 10, TDM-GCC-32bit-10-3.
Starting with a fresh download of 3.1.7 ZIP...

I modified "C:\wxWidgets-3_1_7\build\msw\config.gcc" as follows:
# DRN - was: MONOLITHIC ?= 0
MONOLITHIC ?= 1
# DRN - was: RUNTIME_LIBS ?= dynamic
RUNTIME_LIBS ?= static

I built as follows:

Code: Select all

cd %wxwin%\build\msw
mingw32-make -f makefile.gcc BUILD=debug
cd %wxwin%\demos
mingw32-make -f makefile.gcc BUILD=debug
cd %wxwin%\samples
mingw32-make -f makefile.gcc BUILD=debug
wxWin itself and the demos all built and run fine.
Many samples built (and run) fine until secretstore which fails with the first error as follows:

Code: Select all

g++ -c -o gcc_mswud\secretstore_secretstore.o -g -O0 -mthreads -D__WXMSW__       -D_UNICODE -I.\..\..\lib\gcc_lib\mswud -I.\..\..\include  -W -Wall -I.  -DwxUSE_GUI=0   -Wno-ctor-dtor-privacy   -MTgcc_mswud\secretstore_secretstore.o -MFgcc_mswud\secretstore_secretstore.o.d -MD -MP secretstore.cpp
secretstore.cpp:28:11: error: 'wxSecretStore' was not declared in this scope; did you mean 'wxSecretString'?
   28 | bool Save(wxSecretStore& store, const wxString& service, const wxString& user)
      |           ^~~~~~~~~~~~~
      |           wxSecretString
Thanks for any pointers!
Best Regards, Dave
User avatar
doublemax
Moderator
Moderator
Posts: 19161
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: New 3.1.7 install build, sample 'secretstore' fails

Post by doublemax »

Let's see what the documentation says...
Notice that this class is always available under MSW (except when using MinGW32 which doesn't provide the required wincred.h header) ...
https://docs.wxwidgets.org/trunk/classw ... store.html
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: New 3.1.7 install build, sample 'secretstore' fails

Post by ONEEYEMAN »

Besides what doublemax said - why did you need to edit the Makefile?

They are ready to use solutions and are not intended to be changed in any way by
direct editing.

If you are using MinGW all you needed to do is:

Code: Select all

cd c:\wxWidgets\build\msw
mingw32-bin.exe -f makefile.gcc BUILD=debug RUNTIME_LINS=static MONOLITHIC=1
However, is there a reason you want a monolithic build?

You will not gain anything by using it and you may experience issues in the future as MONOLITHOC build is very rarely tested.

The ONLY reason it exists {still} is because CodeBlocks itself is using it, i.e. people who build CodeBlocks from source and CodeBlocks developers.

If you are a CodeBlocks user or just want to build the library and start development - I would drop this option completely.

Thank you.
DaveNadler
Experienced Solver
Experienced Solver
Posts: 53
Joined: Thu Nov 17, 2011 2:13 pm

Re: New 3.1.7 install build, sample 'secretstore' fails

Post by DaveNadler »

Thanks as always doublemax.
secretstore removed from target list in samples\makefile.gcc and remaining samples all build fine,
Best Regards, Dave

PS: This seemed to work OK with Mingw32 in wxWidgets 3.1.4??

Code: Select all

mingw32-make[1]: Entering directory 'C:/wxWidgets-3_1_4/samples/secretstore'
g++ -c -o gcc_mswud\secretstore_secretstore.o -g -O0 -mthreads  -DHAVE_W32API_H -D__WXMSW__       -D_UNICODE -I.\..\..\lib\gcc_lib\mswud -I.\..\..\include  -W -Wall -I.  -DwxUSE_GUI=0   -Wno-ctor-dtor-privacy   -MTgcc_mswud\secretstore_secretstore.o -MFgcc_mswud\secretstore_secretstore.o.d -MD -MP secretstore.cpp
g++ -o gcc_mswud\secretstore.exe @gcc_mswud\secretstore.exe.rsp  -g -mthreads  -L.\..\..\lib\gcc_lib   -static  -lwxbase31ud    -lwxtiffd -lwxjpegd -lwxpngd   -lwxzlibd -lwxregexud -lwxexpatd   -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme
Post Reply