I'm trying to compile a dynamic library for Julia using C++. Am using CLion on windows. When I compile with MinGW, ccall works perfectly with the dll. When i'm compiling with MSVC, Julia ccall can't find the function. Does anybody have any idea why and how to solve this? I have to use MSVC..
sample code:
test.h
extern "C" int add2(int in);
test.cpp
#include "test.h"
int add2(int in){
return in+2;
}