Mac OS X linker issue
Mac OS X linker issue
HI
Having trouble with some samples linking on 3.1.3. I'm using Mac OS X 10.15.2 and the latest Xcode (11.4).
The errors are linker errors in the libwxtiff-3.1 module. Its unable to find various funcs.
Some samples work fine - persumably they dont need libwxtiff.
Any ideas?
Thanks
PS - I pasted the linker log - but it kept flagging as 'spam content' - finally locking me out for too many forum posts
Having trouble with some samples linking on 3.1.3. I'm using Mac OS X 10.15.2 and the latest Xcode (11.4).
The errors are linker errors in the libwxtiff-3.1 module. Its unable to find various funcs.
Some samples work fine - persumably they dont need libwxtiff.
Any ideas?
Thanks
PS - I pasted the linker log - but it kept flagging as 'spam content' - finally locking me out for too many forum posts
Re: Mac OS X linker issue
Aah - configure missed that it needed a libwebp.a, I've added that manually and they all compile OK now
Re: Mac OS X linker issue
Hi,
Could you post the relevant piece of the configure (about this library)?
You shuoldn't be modifying the makefile in any way...
Thank you.
Could you post the relevant piece of the configure (about this library)?
You shuoldn't be modifying the makefile in any way...
Thank you.
Re: Mac OS X linker issue
Yes sure,
I added -lwebp to the LIBS section in the generated makefile. It is required, but for some reason isnt generated.
This seems to be missing when you run configure. I'm not familiar with cmake / configure so not sure how that would be changed.
I added -lwebp to the LIBS section in the generated makefile. It is required, but for some reason isnt generated.
This seems to be missing when you run configure. I'm not familiar with cmake / configure so not sure how that would be changed.
Re: Mac OS X linker issue
Hi,
I understood that.
But why does it needed and how did you determined that it is?
Thank you.
I understood that.
But why does it needed and how did you determined that it is?
Thank you.
Re: Mac OS X linker issue
So on the final link, without this library their are undefined references e.g.
Undefined symbols for architecture x86_64:
"_WebPConfigInitInternal", referenced from:
_TWebPSetupEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPEncode", referenced from:
_TWebPPostEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPFreeDecBuffer", referenced from:
_TWebPPreDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
_TWebPSetupEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
_TWebPCleanup in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPIAppend", referenced from:
_TWebPDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPIDecGetRGB", referenced from:
_TWebPDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
These functions are all in libwebp.a
Adding the reference fixed the issue. This is Macos X 10.15.2 (Catalina) with the latest XCode.
Undefined symbols for architecture x86_64:
"_WebPConfigInitInternal", referenced from:
_TWebPSetupEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPEncode", referenced from:
_TWebPPostEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPFreeDecBuffer", referenced from:
_TWebPPreDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
_TWebPSetupEncode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
_TWebPCleanup in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPIAppend", referenced from:
_TWebPDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
"_WebPIDecGetRGB", referenced from:
_TWebPDecode in libwxtiff-3.1.a(wxtiff_tif_webp.o)
These functions are all in libwebp.a
Adding the reference fixed the issue. This is Macos X 10.15.2 (Catalina) with the latest XCode.
Re: Mac OS X linker issue
Hi,
What is your exact configure line when building wxWidgets?
Thank you.
What is your exact configure line when building wxWidgets?
Thank you.
Re: Mac OS X linker issue
../configure --disable-shared
Re: Mac OS X linker issue
Hi,
You might open a ticket at trac.wxwidgets.org with the information from this thread.
Also - I would be curious if the dynamic linking has this same issue. Could you please try it?
Thank you.
You might open a ticket at trac.wxwidgets.org with the information from this thread.
Also - I would be curious if the dynamic linking has this same issue. Could you please try it?
Thank you.
Re: Mac OS X linker issue
Hi, posted a ticket.
I wasnt able to get the main library to compile with shared enabled.
I wasnt able to get the main library to compile with shared enabled.
Re: Mac OS X linker issue
Hi,
What is an error you encountered?
I presume you tried:
Thank you.
What is an error you encountered?
I presume you tried:
Code: Select all
../configure --enable-shared && make
Re: Mac OS X linker issue
It looks like it was a bad install :/ - I reinstalled XCode, and ran brew update, and there were a few issues. All cleaned, and re-installed, and ran configure in both shared and static, and all works as expected