Page 1 of 1

wxPdfDoc worning on MAC OSX stattic linking

Posted: Tue Mar 05, 2019 7:21 pm
by cutecode
Hi
If I link my somelib.dylib with libwxcode_osx_cocoau_pdfdoc-3.1.a staticcaly, then I get this annoying warning

Code: Select all

||warning: direct access in function 'wxLogger::~wxLogger()' from file '/usr/local/lib/libwxcode_osx_cocoau_pdfdoc-3.1.a(pdftemplate.o)' to global weak symbol 'wxStringToNumHashMap_wxImplementation_HashTable::DeleteNode(_wxHashTable_NodeBase*)' from file '/Users/admin/Documents/_builds/obj/release64/main/ds/wxMainDll/CreateNewDatabaseDlg.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.|
If I link dynemically then I don't get this message

In both cases I can create PDF files as I expected

Is there somesing awfull in this message?

Thank you

Re: wxPdfDoc worning on MAC OSX stattic linking

Posted: Wed Mar 06, 2019 7:56 am
by utelle
cutecode wrote: Tue Mar 05, 2019 7:21 pm If I link my somelib.dylib with libwxcode_osx_cocoau_pdfdoc-3.1.a staticcaly, then I get this annoying warning

Code: Select all

||warning: direct access in function 'wxLogger::~wxLogger()' from file '/usr/local/lib/libwxcode_osx_cocoau_pdfdoc-3.1.a(pdftemplate.o)' to global weak symbol 'wxStringToNumHashMap_wxImplementation_HashTable::DeleteNode(_wxHashTable_NodeBase*)' from file '/Users/admin/Documents/_builds/obj/release64/main/ds/wxMainDll/CreateNewDatabaseDlg.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.|
I doubt that this warning message has anything to do with the wxPdfDocument library itself. The final sentence in the warning message gives you a hint what might have gone wrong:

Code: Select all

This was likely caused by different translation units being compiled with different visibility settings.
That is, either the wxWidgets library or your own application was built with compiler settings differing from those used for compiling wxPdfDocument.
cutecode wrote: Tue Mar 05, 2019 7:21 pm If I link dynemically then I don't get this message

In both cases I can create PDF files as I expected

Is there somesing awfull in this message?
Most likely your application will not experience major problems. However, usually it is a good idea to resolve such issues as they might cause difficulties later on. That is, you should carefully check that all components of your application are built using the same set of compiler options.

Regards,

Ulrich

Re: wxPdfDoc worning on MAC OSX stattic linking

Posted: Wed Mar 06, 2019 12:04 pm
by cutecode
hello.
Thank you for your time and full explanations

I rebuilded wx3.1.3 and I don't have that warning anymore

my options are:

Code: Select all

../configure --enable-unicode  --with-osx_cocoa --with-macosx-version-min=10.14 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/ CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
If I build wxPdfDoc with the same options, then I get this warning, but I thisnk I should ignore this warning

Code: Select all

configure: WARNING: unrecognized options: --enable-unicode, --with-osx_cocoa, --with-macosx-version-min, --with-macosx-sdk


Thank you

Re: wxPdfDoc worning on MAC OSX stattic linking

Posted: Wed Mar 06, 2019 2:55 pm
by utelle
cutecode wrote: Wed Mar 06, 2019 12:04 pm hello.
Thank you for your time and full explanations

I rebuilded wx3.1.3 and I don't have that warning anymore

my options are:

Code: Select all

../configure --enable-unicode  --with-osx_cocoa --with-macosx-version-min=10.14 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/ CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
If I build wxPdfDoc with the same options, then I get this warning, but I thisnk I should ignore this warning

Code: Select all

configure: WARNING: unrecognized options: --enable-unicode, --with-osx_cocoa, --with-macosx-version-min, --with-macosx-sdk
The configure script of wxPdfDocument does not support the full set of options that the wxWidgets configure script offers. The reason is that the wxPdfDocument configure script uses wx-config to find out the options used to build wxWidgets. If you have more than one wxWidgets build it may be necessary to specify which wxWidgets installation you intend to use. That is, you may have to use one or more of the wx specific options (i.e. --with-wx-prefix). Execute

Code: Select all

./configure --help
to see a full list of options.

Regards,

Ulrich