[Solved] C++ dll export undefined
Here’s your updated code: main.cpp: #include “header.h” extern “C” __declspec(dllexport) int sumTwo(int var_x, int var_y) { myClass MC(var_x, var_y); return MC.sumX_Y(); } header.h: #pragma once class myClass { public: myClass(int var_x, int var_y); int sumX_Y(); private: int x; int y; }; body.cpp: #include “header.h” myClass::myClass(int var_x, int var_y) { x = var_x; y = var_y; … Read more