When linking libdawn_native.so with a different compiler toolchain, I get the error:
~~~
CMakeFiles/Test.dir/src/utils/VulkanBinding.cpp.o : Dans la fonction « utils::VulkanBinding::CreateDevice() » :
VulkanBinding.cpp:(.text._ZN5utils13VulkanBinding12CreateDeviceEv[_ZN5utils13VulkanBinding12CreateDeviceEv]+0x6a) : undefined reference to " dawn_native::vulkan::CreateDevice(std::vector<char const*, std::allocator<char const*> > const&) "
clang: error: linker command failed with exit code 1 (use -v to see invocation)
~~~
dawn_native::vulkan::CreateDevice(std::vector<char const*, std::allocator<char const*> > const&) name mangling algorithm differs depending on which compiler you are using.
Using |extern "C"| in front of the method declaration fixes the problem. It makes the compiler to use "unmangled" symbol for this function.
Comment 1 by arthurso...@chromium.org
, Dec 12