2 modules in 1 plugin unreseolved external symbols error

Hi,
Im trying to create a plugin containing 2 modules but im getting a unresolved external symbol when trying to use one module from the other. Here are the steps I did (im using UE 5.1):

1 I created a Blueprint type plugin
2 I created an Editor Window type plugin
3 I moved the Editor module into the first plugin I created and deleted the 2nd plugin. I leaves me with one plugin with 2 modules.
4 I added the first module in the build.cd file of the Editor module
5 Rebuilt the project files
6 Included the .h file of the main module in my editor module
4 When im instantiating a class from my main module in the editor module im getting this error :

|Error|LNK2019|unresolved external symbol public: void __cdecl FImgSegModule::TestFunction(void)

I dont understand what is going wrong and am wondering if im missing some config files from movig around the module from 1 plugin to the other…
i’ve been looking over internet for 2 days without success

thanks for any help!

I eventually found the problem. I needed {MY_MODULE}_API before the name of my class to be able to share the function…