You need to compile all of your source using winegcc/wineg++ and it also needs to perform the linking. Winegcc/g++ should link with kernel32 by default but for non-standard win32 dlls you need to add -ldllname. E.g. #include <windows.h> int maint(int argc, char **argv) { printf("Hello world winelib\n"); Sleep(1); return 0; } winegcc -o hello hello.c -ldll_name