qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

Linker error (undefined symbol _WebPApplyAlphaMultiply) under OSX calling compression functions [new in 0.4.1] #222

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new blank project in Xcode under OSX 10.9
2. Create a small sample program calling a compression function e.g.:

#include "webp/encode.h"
int main() {
    uint8_t *out, bgr[1];
    WebPEncodeBGR(bgr, 512, 512, 0, 75.0f, &out);
}

3. Include static libwebp library and relevant headers and compile.

What is the expected output? What do you see instead?

A successful build with no linker errors. Instead:

Undefined symbols for architecture x86_64:
  "_WebPApplyAlphaMultiply", referenced from:
      _VP8LConvertFromBGRA in libwebp.a(lossless.o)
  "_WebPApplyAlphaMultiply4444", referenced from:
      _VP8LConvertFromBGRA in libwebp.a(lossless.o)

What version of the product are you using? On what operating system?

libwebp-0.4.1-mac-10.8 running under OS X 10.9

Please provide any additional information below.

libwebp-0.4.0-mac-10.8 works fine with no issues. Attached is sample Xcode 
project to save you the time.

Original issue reported on code.google.com by adampetermarcus on 14 Sep 2014 at 8:36

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,
Thanks for the report and sorry for the delayed response.
I can reproduce this and have uploaded a '-2' build that should address the 
issue [1]. The problem is due to the symbols being marked common which at times 
causes linker problems such as this on OS X. There's a workaround in 
makefile.unix in the tree, but '-fno-common' wasn't used to produce the release 
builds.

[1] 
http://downloads.webmproject.org/releases/webp/libwebp-0.4.1-mac-10.8-2.tar.gz

Original comment by jz...@google.com on 20 Sep 2014 at 1:07

GoogleCodeExporter commented 8 years ago
Thanks, works great :)

Original comment by adampetermarcus on 21 Sep 2014 at 4:19

GoogleCodeExporter commented 8 years ago

Original comment by pascal.m...@gmail.com on 22 Sep 2014 at 5:41