3.1.3 Compile Error

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
wxHuman
Earned a small fee
Earned a small fee
Posts: 13
Joined: Sat Dec 14, 2013 5:37 pm

3.1.3 Compile Error

Post by wxHuman » Wed Dec 11, 2019 9:20 pm

Hi,
I just tried to compile wx 3.1.3 with TDM-GCC 5.1.0 and I got this error( image attached ).
I am using win 7 32bit, if it is related to 32bit.

Thanks.
Attachments
wxError.JPG

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Wed Dec 11, 2019 9:56 pm

Post the commands used to build wxWidgets?
And, you know the Compiler you are using is very old, correct?

Tim S.

wxHuman
Earned a small fee
Earned a small fee
Posts: 13
Joined: Sat Dec 14, 2013 5:37 pm

Re: 3.1.3 Compile Error

Post by wxHuman » Wed Dec 11, 2019 11:19 pm

I could fix the problem and able to compile it but after 1 hour or waiting when it finished compiling I got another problem( image attached ). All libs are created just got problem with dll, now. I don't know about new GCC version, however I download it on 7th November :? .

Thanks for the reply.
Attachments
Dll Failed.jpg

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4373
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: 3.1.3 Compile Error

Post by ONEEYEMAN » Wed Dec 11, 2019 11:30 pm

Hi,
Where did you downloaded the compiler from?
Also, as Tim asked - "What command did you use to build the library"?

Thank you.

wxHuman
Earned a small fee
Earned a small fee
Posts: 13
Joined: Sat Dec 14, 2013 5:37 pm

Re: 3.1.3 Compile Error

Post by wxHuman » Wed Dec 11, 2019 11:35 pm

I have downloaded it from tdragon.net, TDM-GCC.
Here is the command:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 UNICODE=1 MONOLITHIC=1 USE_OPENGL=1 CXXFLAGS="-fno-keep-inline-dllexport"

EDIT: I think I should download GCC and wx development build.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Thu Dec 12, 2019 3:43 am

Was able to duplicate this error.

Code: Select all

g++ -shared -fPIC -o ..\..\lib\gcc_dll\wxmsw313u_gcc_custom.dll @..\..\lib\gcc_dll\wxmsw313u_gcc_custom.dll.rsp   -mthreads -L..\..\lib\gcc_dll -Wl,--out-implib=..\..\lib\gcc_dll\libwxmsw31u.a    -lwxtiff -lwxjpeg -lwxpng   -lwxzlib -lwxregexu -lwxexpat   -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme      ..\..\lib\gcc_dll\libwxscintilla.a
..\..\lib\gcc_dll/libwxexpat.a (wxexpat_xmlparse.o):xmlparse.c:(.text+0x337d): undefined reference to `_imp__rand_s'

Code: Select all

mingw32-make -f makefile.gcc BUILD=release SHARED=1 UNICODE=1 MONOLITHIC=1 USE_OPENGL=1 CXXFLAGS="-fno-keep-inline-dllexport"

Code: Select all

C:\SourceCode\wxWidgets-3.1.3\build\msw>g++ --version
g++ (tdm-1) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I would suggest trying a newer compiler to see if that fixes the problem.

Tim S.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4373
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: 3.1.3 Compile Error

Post by ONEEYEMAN » Thu Dec 12, 2019 3:45 am

Tim,
Probably worth opening a ticket/PR.

Thank you.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Thu Dec 12, 2019 3:57 am

Probably worth opening a ticket/PR.
Maybe, if I could duplicate it using git master. But, I see no reason to report a problem till then.
No idea, when I will have time to try it against git master.

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Fri Dec 13, 2019 5:39 am

Problem happens on Git master and without "MONOLITHIC=1", it happens even faster.

Trying a simple define of _CRT_RAND_S to see if that fixes the error.
Edit: Looks like it was already defined in xmlparse.c so it is not likely to fix problem.
Edit2: https://docs.wxwidgets.org/trunk/plat_msw_install.html
Per above link the compiler should be supported.
Edit3: Plan to test using newer mingw.org GCC to see if the same error exists with it.

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Fri Dec 13, 2019 5:50 pm

Code: Select all

g++ (MinGW.org GCC-8.2.0-5) 8.2.0
wx git master builds without the error using above version.

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Fri Dec 13, 2019 10:30 pm


stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 373
Joined: Fri Nov 03, 2006 2:00 pm

Re: 3.1.3 Compile Error

Post by stahta01 » Mon Dec 16, 2019 1:44 am


Post Reply