Build failure, including x265.h multiple times in a C library

Issue #39 resolved
Former user created an issue

x265_cli_csps is defined as const, which defaults to external linkage in C (unlike C++ where it defaults to internal linkage).

When including x265.h in two different C files in the same library, this causes linking to fail with errors such as:

duplicate symbol _x265_cli_csps in: /Volumes/BUFFALO_VMS/shared/hb-linux/build/libhb/libhandbrake.a(common.o) /Volumes/BUFFALO_VMS/shared/hb-linux/build/libhb/libhandbrake.a(encx265.o) ld: 1 duplicate symbol for architecture x86_64

Comments (3)

  1. Log in to comment