Regression test: libccpp has both C and C++ sources. The executable only has C sources. It should still link using the C++ compiler. When using both_libraries the static has no sources and thus no compilers, resulting in the executable linking using the C compiler. https://github.com/Netflix/vmaf/issues/1107pull/10976/head
parent
8d8ce4fb77
commit
81763e610f
4 changed files with 35 additions and 4 deletions
@ -0,0 +1,11 @@ |
||||
#include <memory> |
||||
#include "mylib.h" |
||||
|
||||
extern "C" { |
||||
DO_EXPORT int foo(void); |
||||
} |
||||
|
||||
int foo(void) { |
||||
auto bptr = std::make_shared<int>(0); |
||||
return *bptr; |
||||
} |
@ -0,0 +1,9 @@ |
||||
#include "mylib.h" |
||||
|
||||
DO_IMPORT int func(void); |
||||
DO_IMPORT int foo(void); |
||||
DO_IMPORT int retval; |
||||
|
||||
int main(void) { |
||||
return func() + foo() == retval ? 0 : 1; |
||||
} |
Loading…
Reference in new issue