delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/29/22:53:28

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: which libs to link
29 Oct 1997 22:53:28 -0800 :
Message-ID: <01BCE52D.0E0AA940.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
To: "'Thomas Nichols'" <thomas DOT nichols AT mail DOT com>
Cc: "'GNU-Win32'" <gnu-win32 AT cygnus DOT com>

Thomas Nichols[SMTP:thomas DOT nichols AT mail DOT com] wrote:
>Now down to 2 problems:
>1. Missing identifiers - can anyone tell me values for these?
>critical:
>LOCALE_SINTLSYMBOL
>LOCALE_IINTLCURRDIGITS
>WC_DIALOG

Apparently

#define LOCALE_SINTLSYMBOL		(0x15)
#define LOCALE_IINTLCURRDIGITS	(0x1A)
#define WC_DIALOG				(MAKEINTATOM(0x8002))

>less urgent (can use win16 code)
>WNDCLASSA
>WIN32_FIND_DATAA
>OPENFILENAMEA

For all these structures the current GNU Win32 API headers use a
slightly different strategy of using TCHAR type declarations for
characters and string members. To be strictly compatible change
all those definitions to the approprate CHAR values (or LPCSTR
and such) for WNDCLASSA etc, and WCHAR (LPCWSTR etc) for WNDCLASSW,
then typedef WNDCLASS according to UNICODE (see Structures.h).

typedef struct _WNDCLASSA
{
  ...
  LPCSTR ...
} WNDCLASSA, *LPWNDCLASSA;

typedef struct _WNDCLASSW
{
   ...
   LPCWSTR ...
} WNDCLASSW, *LPWNDCLASSW;

#ifdef UNICODE
typedef WNDCLASSW WNDCLASS;
#else
typedef WNDCLASSA WNDCLASS;
#endif
typedef WNDCLASS *LPWNDCLASS;

And so on...

>gcc -o wtest32.exe test.o -L. -lzaf5 -luser32 -lkernel32 -lshell32
>-lcomctl32 -lcomdlg32 > link.err
>
>which gives (from the start of lib.err)
>
>./libzaf5.a(w_window.o)(.text+0x495):w_window.cc: undefined reference to
>`CreateRectRgn AT 16'
[snip]
>./libzaf5.a(w_winobj.o)(.text+0x3097):w_winobj.cc: undefined reference to
>`SelectPalette AT 12'
>..... etc ......
>
>Which are the import libs I need to resolve these refs?

Looks like gdi32 to me, at least for the ones you included. And,
don't put -lkernel32 on your command line, it gets linked
automatically and linking the same import lib twice causes errors
(though sometimes subtle ones). You might want to consider using
-mwindows instead (since your program is probably a GUI program
anyway)

>System: Win95b cygwin32 2.7.2 b18, no patches
>(can't get mingw32 working yet)

Really? Can you tell me what sort of problems you have (so I can
try and fix them for the next release, or at least for you)?

Colin.

-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019