Re: [Tinycc-devel] Why doesn't this work in TCC?

2017-03-31 Thread Austin English
On Fri, Mar 31, 2017 at 11:59 PM, Ben Hutchinson  wrote:
> I just tried this code:
>
> #include 
> void _start(void){
> HWND wnd;
> HDC dc;
> wnd = 0;
> dc = GetDC(wnd);
> ReleaseDC(wnd,dc);
> ExitProcess(0);
> }
>
>
>
>
> But then when I compiled it, I got this error:
>
> tcc: error: undefined symbol '_GetDC@4'
> tcc: error: undefined symbol '_ReleaseDC@8'
>
>
>
>
> I don't know where it's getting those errors. The windows.h include file is
> supposed to include all the correct definitions of all the Windows API
> functions. And the ones that aren't directly defined in windows.h are
> defined in other include files that windows.h has included in itself (there
> are other #include statements in windows.h). So they should ALL be defined,
> but these 2 very common ones for working with graphics, have either not been
> defined, or have been incorrectly defined (some kind of bug in one of the
> include files).
>
> Can somebody here please tell me exactly why it's not working?
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>

As a starting point, have you tried doing a hello world with just
windows.h included? There very well may be a regression that broke
something that is in windows.h.

-- 
-Austin
GPG: 14FB D7EA A041 937B

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] Why doesn't this work in TCC?

2017-03-31 Thread Ben Hutchinson
I just tried this code:

#include 
void _start(void){
HWND wnd;
HDC dc;
wnd = 0;
dc = GetDC(wnd);
ReleaseDC(wnd,dc);
ExitProcess(0);
}




But then when I compiled it, I got this error:

tcc: error: undefined symbol '_GetDC@4'
tcc: error: undefined symbol '_ReleaseDC@8'




I don't know where it's getting those errors. The windows.h include file is
supposed to include all the correct definitions of all the Windows API
functions. And the ones that aren't directly defined in windows.h are
defined in other include files that windows.h has included in itself (there
are other #include statements in windows.h). So they should ALL be defined,
but these 2 very common ones for working with graphics, have either not
been defined, or have been incorrectly defined (some kind of bug in one of
the include files).

Can somebody here please tell me exactly why it's not working?
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel