After I found it earlier that #pragma comment is for MSVC only, I came accross this code, and I was wondering if I could translate it to a MinGW equivelent, i.e. something I can compile with MinGW.
1 2 3 4 5 6 7
#ifdef TEST_EXPORTS
#define TEST_API __declspec(dllexport)
#else
#define TEST_API __declspec(dllimport)
#pragma message("automatic link to Test.lib") // <== add this line
#pragma comment(lib, "Test.lib") // <== add this line
#endif