-2

So I have installed gdc trying to do a simple compile at command prompt. Not sure if my imports\includes actually work? What should I do? I am 100% sure the program compiles with Eclipse\dub\dtt\ldc...

*C:\Development\gdc\bin>x86_64-unknown-linux-gnu-gdc C:\Users\plann\Downloads\test\MessageApp\src\app.d --sysroot=C:\Development\gdc\sysroot -B "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib"
C:\Users\plann\Downloads\test\MessageApp\src\app.d:13:7: error: undefined identifier 'DWORD'
 DWORD bakgrunfar = 0;
       ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:14:7: error: undefined identifier 'DWORD'
 DWORD textfar  = 0;
       ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:17:7: error: undefined identifier 'HFONT'
 HFONT hFont, hOldFont;
       ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:17:14: error: undefined identifier 'HFONT'
 HFONT hFont, hOldFont;
              ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:20:5: error: undefined identifier 'HWND'
 int WindowProcedure (HWND, UINT, WPARAM, LPARAM );
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:20:5: error: undefined identifier 'UINT'
 int WindowProcedure (HWND, UINT, WPARAM, LPARAM );
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:20:5: error: undefined identifier 'WPARAM'
 int WindowProcedure (HWND, UINT, WPARAM, LPARAM );
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:20:5: error: undefined identifier 'LPARAM'
 int WindowProcedure (HWND, UINT, WPARAM, LPARAM );
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:23:5: error: undefined identifier 'HINSTANCE'
 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:23:5: error: undefined identifier 'HINSTANCE'
 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:23:5: error: undefined identifier 'LPSTR'
 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:44:5: error: undefined identifier 'HINSTANCE'
 int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:44:5: error: undefined identifier 'HINSTANCE'
 int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:44:5: error: undefined identifier 'LPSTR'
 int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:99:5: error: undefined identifier 'HWND'
 int WindowProcedure(HWND hwnd, UINT AEX, WPARAM wParam, LPARAM lParam) nothrow
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:99:5: error: undefined identifier 'UINT'
 int WindowProcedure(HWND hwnd, UINT AEX, WPARAM wParam, LPARAM lParam) nothrow
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:99:5: error: undefined identifier 'WPARAM'
 int WindowProcedure(HWND hwnd, UINT AEX, WPARAM wParam, LPARAM lParam) nothrow
     ^
C:\Users\plann\Downloads\test\MessageApp\src\app.d:99:5: error: undefined identifier 'LPARAM'
 int WindowProcedure(HWND hwnd, UINT AEX, WPARAM wParam, LPARAM lParam) nothrow*
Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
Alex
  • 1
  • 1

1 Answers1

2

We cannot help without taking a look at the app.d. From the errors it seems that you did not import windows module that defines the various Windows-specific types.. Start with the following two typical imports:

import core.runtime;
import core.sys.windows.windows;

I strongly suggest you reading the following guide: https://wiki.dlang.org/D_for_Win32

DejanLekic
  • 18,787
  • 4
  • 46
  • 77