Thanks for your answer, Bazis. I tried it now with a explicitly called dll. ( created the .def file manually and then created the .lib file using microsofts lib.exe ). While everything works when there is no printf ( or std::cout ) in the dll, I get an access violation error when they are included. std::cout -> Unhandled exception at 0x00000003FD11D61D (cygstdc++-6.dll) in callingDLL.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. printf -> Unhandled exception at 0x000000018011AE47 (cygwin1.dll) in callingDLL.exe: 0xC0000005: Access violation writing location 0x00000000D10400D5. I really tried to solve this, but failed. So, sorry if this some sort of a beginners problem, again…