Author Topic: svn 11798 compilation problem  (Read 861 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 570
svn 11798 compilation problem
« on: July 22, 2019, 10:31:24 am »
The modification introduced in svn 11798 in globals.cpp and globals.h cause a problem in the compilation, more specifically at link time. svn 11797 compilation is OK.
I obtain this message in the log window :
Code: [Select]
-------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -O -pipe -mthreads -m64 -fmessage-length=0 -fexceptions -std=gnu++11 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -std=gnu++11 -Wno-deprecated-declarations -DNDEBUG -DwxDEBUG_LEVEL=0 -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -IC:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src\sdk -IC:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src -c C:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src\sdk\configmanager-revision.cpp -o .objs31_64\sdk\configmanager-revision.o

...

mingw32-g++.exe -Wall -O -pipe -mthreads -m64 -fmessage-length=0 -fexceptions -std=gnu++11 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -std=gnu++11 -Wno-deprecated-declarations -DNDEBUG -DwxDEBUG_LEVEL=0 -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -IC:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src\sdk -IC:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src -c C:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src\sdk\globals.cpp -o .objs31_64\sdk\globals.o

...

mingw32-g++.exe -shared  -Wl,--out-implib=devel31_64\libcodeblocks.a -Wl,--dll -LC:\wxWidgets-3.1.2\lib\gcc_dll -Ldevel31_64 .objs31_64\sdk\configmanager-revision.o .objs31_64\sdk\annoyingdialog.o .objs31_64\sdk\autodetectcompilers.o .objs31_64\sdk\base64.o .objs31_64\sdk\blockallocated.o .objs31_64\sdk\cbart_provider.o .objs31_64\sdk\cbauibook.o .objs31_64\sdk\cbcolourmanager.o .objs31_64\sdk\cbdebugger_interfaces.o .objs31_64\sdk\cbeditor.o .objs31_64\sdk\cbeditorprintout.o .objs31_64\sdk\cbexception.o .objs31_64\sdk\cbplugin.o .objs31_64\sdk\cbproject.o .objs31_64\sdk\cbstatusbar.o .objs31_64\sdk\cbstyledtextctrl.o .objs31_64\sdk\cbthreadpool.o .objs31_64\sdk\cbtreectrl.o .objs31_64\sdk\cbworkspace.o .objs31_64\sdk\ccmanager.o .objs31_64\sdk\compileoptionsbase.o .objs31_64\sdk\compiler.o .objs31_64\sdk\compilercommandgenerator.o .objs31_64\sdk\compilerfactory.o .objs31_64\sdk\compileroptions.o .objs31_64\sdk\compiletargetbase.o .objs31_64\sdk\configmanager.o .objs31_64\sdk\configurationpanel.o .objs31_64\sdk\configuretoolsdlg.o .objs31_64\sdk\confirmreplacedlg.o .objs31_64\sdk\crc32.o .objs31_64\sdk\debuggermanager.o .objs31_64\sdk\editarrayfiledlg.o .objs31_64\sdk\editarrayorderdlg.o .objs31_64\sdk\editarraystringdlg.o .objs31_64\sdk\editor_hooks.o .objs31_64\sdk\editorbase.o .objs31_64\sdk\editorcolourset.o .objs31_64\sdk\editorlexerloader.o .objs31_64\sdk\editormanager.o .objs31_64\sdk\editpairdlg.o .objs31_64\sdk\editpathdlg.o .objs31_64\sdk\edittooldlg.o .objs31_64\sdk\encodingdetector.o .objs31_64\sdk\externaldepsdlg.o .objs31_64\sdk\filefilters.o .objs31_64\sdk\filegroupsandmasks.o .objs31_64\sdk\filemanager.o .objs31_64\sdk\findreplacedlg.o .objs31_64\sdk\genericmultilinenotesdlg.o .objs31_64\sdk\globals.o .objs31_64\sdk\importers_globals.o .objs31_64\sdk\incremental_select_helper.o .objs31_64\sdk\infowindow.o .objs31_64\sdk\loggers.o .objs31_64\sdk\logmanager.o .objs31_64\sdk\macrosmanager.o .objs31_64\sdk\manager.o .objs31_64\sdk\menuitemsmanager.o .objs31_64\sdk\mozilla_chardet\src\CharDistribution.o .objs31_64\sdk\mozilla_chardet\src\JpCntx.o .objs31_64\sdk\mozilla_chardet\src\LangBulgarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangCyrillicModel.o .objs31_64\sdk\mozilla_chardet\src\LangGreekModel.o .objs31_64\sdk\mozilla_chardet\src\LangHebrewModel.o .objs31_64\sdk\mozilla_chardet\src\LangHungarianModel.o .objs31_64\sdk\mozilla_chardet\src\LangThaiModel.o .objs31_64\sdk\mozilla_chardet\src\nsBig5Prober.o .objs31_64\sdk\mozilla_chardet\src\nsCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscCharsetProber.o .objs31_64\sdk\mozilla_chardet\src\nsEscSM.o .objs31_64\sdk\mozilla_chardet\src\nsEUCJPProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCKRProber.o .objs31_64\sdk\mozilla_chardet\src\nsEUCTWProber.o .objs31_64\sdk\mozilla_chardet\src\nsGB2312Prober.o .objs31_64\sdk\mozilla_chardet\src\nsHebrewProber.o .objs31_64\sdk\mozilla_chardet\src\nsLatin1Prober.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsMBCSSM.o .objs31_64\sdk\mozilla_chardet\src\nsSBCharSetProber.o .objs31_64\sdk\mozilla_chardet\src\nsSBCSGroupProber.o .objs31_64\sdk\mozilla_chardet\src\nsSJISProber.o .objs31_64\sdk\mozilla_chardet\src\nsUniversalDetector.o .objs31_64\sdk\mozilla_chardet\src\nsUTF8Prober.o .objs31_64\sdk\multiselectdlg.o .objs31_64\sdk\newfromtemplatedlg.o .objs31_64\sdk\personalitymanager.o .objs31_64\sdk\pipedprocess.o .objs31_64\sdk\pluginmanager.o .objs31_64\sdk\pluginsconfigurationdlg.o .objs31_64\sdk\printing_types.o .objs31_64\sdk\projectbuildtarget.o .objs31_64\sdk\projectfile.o .objs31_64\sdk\projectfileoptionsdlg.o .objs31_64\sdk\projectlayoutloader.o .objs31_64\sdk\projectloader.o .objs31_64\sdk\projectloader_hooks.o .objs31_64\sdk\projectmanager.o .objs31_64\sdk\projectsfilemasksdlg.o .objs31_64\sdk\projecttemplateloader.o .objs31_64\sdk\scripting\bindings\sc_consts.o .objs31_64\sdk\scripting\bindings\sc_dialog.o .objs31_64\sdk\scripting\bindings\sc_globals.o .objs31_64\sdk\scripting\bindings\sc_io.o .objs31_64\sdk\scripting\bindings\sc_plugin.o .objs31_64\sdk\scripting\bindings\sc_progress.o .objs31_64\sdk\scripting\bindings\sc_util_dialogs.o .objs31_64\sdk\scripting\bindings\sc_wxtypes.o .objs31_64\sdk\scripting\bindings\scriptbindings.o .objs31_64\sdk\scriptingmanager.o .objs31_64\sdk\scriptsecuritywarningdlg.o .objs31_64\sdk\scrollingdialog.o .objs31_64\sdk\sdk_events.o .objs31_64\sdk\searchresultslog.o .objs31_64\sdk\selecttargetdlg.o .objs31_64\sdk\templatemanager.o .objs31_64\sdk\tinywxuni.o .objs31_64\sdk\toolsmanager.o .objs31_64\sdk\uservarmanager.o .objs31_64\sdk\workspaceloader.o .objs31_64\sdk\xtra_res.o  -o devel31_64\codeblocks.dll -Wl,--enable-auto-image-base -Wl,--export-all-symbols -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined  -lshfolder -ltxml -lwxscintilla_cb -lsqplus -lsqstdlib -lsquirrel -lgdi32 -lwxmsw31u
.objs31_64\sdk\editormanager.o:editormanager.cpp:(.text+0xe43): undefined reference to `cbGetActualContentScaleFactor(wxWindow const&)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (3 minute(s), 34 second(s))
2 error(s), 22 warning(s) (3 minute(s), 34 second(s))
If I revert 11798 modifications (deleting the const in lines 305 and 309 in globals.h, 1162 and 1176 in globals.cpp), everything seems OK.
I'm on Windows 10, using MinGW64 8.1.0, seh, posix, compiled with wxwidgets 3.1.2. Compilation in 64 bits.

gd_on
« Last Edit: July 22, 2019, 10:36:13 am by gd_on »
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 522
Re: svn 11798 compilation problem
« Reply #1 on: July 22, 2019, 01:27:06 pm »
The problem is in globals.cpp, the function for GTK was changed but the rest was not.

Around line 1211 (my globals.cpp has more lines than the trunk one) the code should be:

Code: [Select]
#else // __WXGTK__
double cbGetActualContentScaleFactor(const wxWindow &window)
{
    return cbGetContentScaleFactor(window);
}
#endif // __WXGTK__

Offline gd_on

  • Lives here!
  • ****
  • Posts: 570
Re: svn 11798 compilation problem
« Reply #2 on: July 22, 2019, 07:34:13 pm »
On official globals.cpp, it's at line 1205. Looks OK now with this correction ;). Thanks.

gd_on
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12772
    • Travis build status
Re: svn 11798 compilation problem
« Reply #3 on: July 22, 2019, 09:47:51 pm »
Fixed.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]