Link2019 when call other module(Plugin)'s global function

For example,in module A ,aa.h declared a global function “void DoSomething()”, aa.cpp defined “void DoSomething()”.other code in the A module calls DoSomething will not be a problem, but the B module calls DoSomething will appear Link2019 error

127417-qq截图20170223194959.png

To be honest, I don’t know why not.But I know what to do, you can implement the function directly in the.h file, if there are still errors, you can use a class or struct that contains the function, use static function,is work.
我也遇到这个问题,你可以直接在头文件里面实现函数,一般可以解决问题,但是有时候还是会有问题,那你就用一个类或者结构体包含的静态函数来实现,就可以调用。
至于为什么会这样,我猜应该是因为插件都是使用动态库的形式,应该是导出函数的问题,但是我懒得去看到底为什么了,反正UE4一堆坑,能用就行