> Did you link debug.lib in?
No I didn't and thank you, that solved that error but there are few more, I probably didn't include some other libraries as well. Output is:
C:\Tools\mingw\bin\gcc @makefile.lnk
C:/Tools/xharbour/lib/librtl.a(tone.o):tone.c:(.text+0xf1): undefined reference
to `_imp__waveOutOpen@24'
C:/Tools/xharbour/lib/librtl.a(tone.o):tone.c:(.text+0x179): undefined reference
to `_imp__waveOutPrepareHeader@12'
C:/Tools/xharbour/lib/librtl.a(tone.o):tone.c:(.text+0x277): undefined reference
to `_imp__waveOutWrite@12'
C:/Tools/xharbour/lib/librtl.a(tone.o):tone.c:(.text+0x2bb): undefined reference
to `_imp__waveOutUnprepareHeader@12'
c:/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.1/../../../../i686-w64-mingw3
2/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0
x39): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
librtl is included (2 times actually but I don't understand why).Rajko