I compile your example and succeeded. But when I'm trying to compile my project which contains many files I have undefined reference errors. I compile my project with following parameters: Code: wineg++ -c file1.cpp -o file1.o -I/usr/include/wine/msvcrt -I/usr/include/wine/windows -lkernel32 -lmsvcrt -luser32 wineg++ -c file2.cpp -o file2.o -I/usr/include/wine/msvcrt -I/usr/include/wine/windows -lkernel32 -lmsvcrt -luser32 ..................................................................... wineg++ -o my_prog file1.o file2.o ... -L/usr/lib/wine -lkernel32 -lmsvcrt -luser32 May be I do something wrong?