This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: which libs to link


Thomas Nichols[SMTP:thomas.nichols@mail.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@16'
[snip]
>./libzaf5.a(w_winobj.o)(.text+0x3097):w_winobj.cc: undefined reference to
>`SelectPalette@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@bird.fu.is.saga-u.ac.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]