wxPdfDoc worning on MAC OSX stattic linking Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
User avatar
cutecode
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 227
Joined: Fri Dec 09, 2016 7:28 am
Contact:

wxPdfDoc worning on MAC OSX stattic linking

Post by cutecode » Tue Mar 05, 2019 7:21 pm

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
regards,
Alexander Saprykin
www.wxwidgets.ru

utelle
Moderator
Moderator
Posts: 856
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxPdfDoc worning on MAC OSX stattic linking

Post by utelle » Wed Mar 06, 2019 7:56 am

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

User avatar
cutecode
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 227
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxPdfDoc worning on MAC OSX stattic linking

Post by cutecode » 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


Thank you
regards,
Alexander Saprykin
www.wxwidgets.ru

utelle
Moderator
Moderator
Posts: 856
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxPdfDoc worning on MAC OSX stattic linking

Post by utelle » Wed Mar 06, 2019 2:55 pm

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

Post Reply