Structor error LNK2019

Script editor, GUI designer, debugger and tools for AutoHotkey
xroot
Posts: 11
Joined: 21 Jun 2019, 08:45

Structor error LNK2019

26 Mar 2020, 08:56

What am I doing wrong, compiling WNDCLASSEXW
32 bit offset works fine
64 bit offset I get this
Offsets.obj : error LNK2019: unresolved external symbol _printf referenced in function _main
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
Offsets64.exe : fatal error LNK1120: 2 unresolved externals
Structure Declaration

Code: Select all

typedef struct tagWNDCLASSEXW {
  UINT      cbSize;
  UINT      style;
  WNDPROC   lpfnWndProc;
  int       cbClsExtra;
  int       cbWndExtra;
  HINSTANCE hInstance;
  HICON     hIcon;
  HCURSOR   hCursor;
  HBRUSH    hbrBackground;
  LPCWSTR   lpszMenuName;
  LPCWSTR   lpszClassName;
  HICON     hIconSm;
} 
User avatar
Alguimist
Posts: 369
Joined: 05 Oct 2015, 16:41
Contact:

Re: Structor error LNK2019

27 Mar 2020, 07:40

32 bit offset works fine? Make sure that both compiler architectures are working fine. Keys F2-F4 provide samples for testing.

The structure name is being omitted at the end of the declaration.

WNDCLASSEXW:

Code: Select all

typedef struct tagWNDCLASSEXW {
  UINT      cbSize;
  UINT      style;
  WNDPROC   lpfnWndProc;
  int       cbClsExtra;
  int       cbWndExtra;
  HINSTANCE hInstance;
  HICON     hIcon;
  HCURSOR   hCursor;
  HBRUSH    hbrBackground;
  LPCWSTR   lpszMenuName;
  LPCWSTR   lpszClassName;
  HICON     hIconSm;
} WNDCLASSEXW, *PWNDCLASSEXW, *NPWNDCLASSEXW, *LPWNDCLASSEXW;
You can also change the following line in the script to deal with that:

Code: Select all

} Else If (RegExMatch(Line, "struct (\w+)", Match)) {

Code: Select all

} Else If (RegExMatch(Line, "struct (?:tag)?(\w+)", Match)) {

Return to “AutoGUI”

Who is online

Users browsing this forum: No registered users and 2 guests