Mercurial > dwindows
diff dw.h @ 2864:939fbceec13f
Win: Add support for building the C++ dwtestoo with Visual C.
Need to use dwmain() macro instead of standard main() entrypoint for Windows.
Had to move the _dw_convertargs() definition outside of the dwmain() macro.
The macro can be called from C++ code changing the function definition.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 17 Dec 2022 01:50:26 +0000 |
parents | 7479ab54e014 |
children | 761b7a12b079 |
line wrap: on
line diff
--- a/dw.h Fri Dec 16 13:33:29 2022 +0000 +++ b/dw.h Sat Dec 17 01:50:26 2022 +0000 @@ -1949,7 +1949,6 @@ #elif defined(__WIN32__) #define dwmain(a, b) \ _dwmain(a, b); \ -char ** API _dw_convertargs(int *count, char *start, HINSTANCE hInstance); \ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {\ int argc; \ char **argv = _dw_convertargs(&argc, lpCmdLine, hInstance); \ @@ -2248,6 +2247,10 @@ /* Exported for language bindings */ void API _dw_init_thread(void); void API _dw_deinit_thread(void); +/* Exported for WinMain handing macro on Windows */ +#ifdef __WIN32__ +char ** API _dw_convertargs(int *count, char *start, HINSTANCE hInstance); +#endif #ifdef __cplusplus }