public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: which libs to link
@ 1997-10-29 20:36 Colin Peters
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Peters @ 1997-10-29 20:36 UTC (permalink / raw)
  To: 'Thomas Nichols'; +Cc: 'GNU-Win32'

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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: which libs to link
  1997-11-04  2:29 ` Mikey
@ 1997-11-04 15:45   ` Thomas Nichols
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Nichols @ 1997-11-04 15:45 UTC (permalink / raw)
  To: jeffdb, gnu-win32

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2275 bytes --]

Great, thanks both of you.
Regards,
Tom.


At 10:25 04/11/97 GMT, you wrote:
>No lib has GetWindowTask,
>you need to find out where 
>GetWindowThreadProcessId
>is, and link with that.
>
>If the macro from below isn't in the Windows32
>headers, you should add it to the begriming of your
>.c file.
>
>cd .../H-i386-cygwin32/i386-cygwin32/lib
>grep -l GetWindowThreadProcessId *.a    (small L)
>nm libLIBNAME.a > filename
>edit filename
>
>On Mon, 3 Nov 1997 13:14:43 +-200, you wrote:
>
>>Hi there!
>>
>>----------
>>From: 	Thomas Nichols[SMTP:thomas.nichols@mail.com]
>>Sent: 	01 Íîåìâðè 1997 ã. 17:12
>>To: 	gnu-win32@cygnus.com
>>Subject: 	RE: which libs to link
>>
>>2-minute questions: which lib has GeWindowTask? I'm also having problems
>>with strlwr but I think it's because of a #undef
>>
>>Thanks very much to all those who've offered fast and practical advice.
>>Beats any commercial compiler's support hands down.
>>
>>Take a look at the following info. It's taken from the MSVC++ 4.2 help
pages.
>>Hope it'll help you!
>>
>>The GetWindowTask function is not implemented in the WIn32 API. 
>>To maintain compatibility with 16-bit applications, GetWindowTask has
been replaced with a macro that calls GetWindowThreadProcessId. Earlier
applications can continue to call GetWindowTask as previously documented,
but new applications should use GetWindowThreadProcessId. 
>>
>>Remarks
>>GetWindowTask is defined as returning a value with a HANDLE data type.
GetWindowThreadProcessId returns a value with a DWORD data type. The macro
that maps GetWindowTask to GetWindowThreadProcessId includes a cast to
HANDLE, as follows: 
>>#define GetWindowTask(hwnd) \\  
>>    ((HANDLE) GetWindowThreadProcessId(hwnd, NULL)) 
>>
>>
>>-
>>For help on using this list (especially unsubscribing), send a message to
>>"gnu-win32-request@cygnus.com" with one line of text: "help".
>>
>
>(jeffdbREMOVETHIS@netzone.com)
>delete REMOVETHIS from the above to reply
>         Mikey
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>
>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: which libs to link
  1997-11-04  0:18 Pavel Tzekov
@ 1997-11-04  2:29 ` Mikey
  1997-11-04 15:45   ` Thomas Nichols
  0 siblings, 1 reply; 6+ messages in thread
From: Mikey @ 1997-11-04  2:29 UTC (permalink / raw)
  To: Pavel Tzekov, gnu-win32

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]

No lib has GetWindowTask,
you need to find out where 
GetWindowThreadProcessId
is, and link with that.

If the macro from below isn't in the Windows32
headers, you should add it to the begriming of your
.c file.

cd .../H-i386-cygwin32/i386-cygwin32/lib
grep -l GetWindowThreadProcessId *.a    (small L)
nm libLIBNAME.a > filename
edit filename

On Mon, 3 Nov 1997 13:14:43 +-200, you wrote:

>Hi there!
>
>----------
>From: 	Thomas Nichols[SMTP:thomas.nichols@mail.com]
>Sent: 	01 Íîåìâðè 1997 ã. 17:12
>To: 	gnu-win32@cygnus.com
>Subject: 	RE: which libs to link
>
>2-minute questions: which lib has GeWindowTask? I'm also having problems
>with strlwr but I think it's because of a #undef
>
>Thanks very much to all those who've offered fast and practical advice.
>Beats any commercial compiler's support hands down.
>
>Take a look at the following info. It's taken from the MSVC++ 4.2 help pages.
>Hope it'll help you!
>
>The GetWindowTask function is not implemented in the WIn32 API. 
>To maintain compatibility with 16-bit applications, GetWindowTask has been replaced with a macro that calls GetWindowThreadProcessId. Earlier applications can continue to call GetWindowTask as previously documented, but new applications should use GetWindowThreadProcessId. 
>
>Remarks
>GetWindowTask is defined as returning a value with a HANDLE data type. GetWindowThreadProcessId returns a value with a DWORD data type. The macro that maps GetWindowTask to GetWindowThreadProcessId includes a cast to HANDLE, as follows: 
>#define GetWindowTask(hwnd) \\  
>    ((HANDLE) GetWindowThreadProcessId(hwnd, NULL)) 
>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>

(jeffdbREMOVETHIS@netzone.com)
delete REMOVETHIS from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: which libs to link
@ 1997-11-04  0:18 Pavel Tzekov
  1997-11-04  2:29 ` Mikey
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Tzekov @ 1997-11-04  0:18 UTC (permalink / raw)
  To: gnu-win32, 'Thomas Nichols'

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

Hi there!

----------
From: 	Thomas Nichols[SMTP:thomas.nichols@mail.com]
Sent: 	01 Íîåìâðè 1997 ã. 17:12
To: 	gnu-win32@cygnus.com
Subject: 	RE: which libs to link

2-minute questions: which lib has GeWindowTask? I'm also having problems
with strlwr but I think it's because of a #undef

Thanks very much to all those who've offered fast and practical advice.
Beats any commercial compiler's support hands down.

Take a look at the following info. It's taken from the MSVC++ 4.2 help pages.
Hope it'll help you!

The GetWindowTask function is not implemented in the WIn32 API. 
To maintain compatibility with 16-bit applications, GetWindowTask has been replaced with a macro that calls GetWindowThreadProcessId. Earlier applications can continue to call GetWindowTask as previously documented, but new applications should use GetWindowThreadProcessId. 

Remarks
GetWindowTask is defined as returning a value with a HANDLE data type. GetWindowThreadProcessId returns a value with a DWORD data type. The macro that maps GetWindowTask to GetWindowThreadProcessId includes a cast to HANDLE, as follows: 
#define GetWindowTask(hwnd) \\  
    ((HANDLE) GetWindowThreadProcessId(hwnd, NULL)) 


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: which libs to link
@ 1997-11-01  7:18 Thomas Nichols
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Nichols @ 1997-11-01  7:18 UTC (permalink / raw)
  To: gnu-win32

2-minute questions: which lib has GeWindowTask? I'm also having problems
with strlwr but I think it's because of a #undef

Thanks very much to all those who've offered fast and practical advice.
Beats any commercial compiler's support hands down.

Thanks again,
Regards,
Tom.
 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* which libs to link
@ 1997-10-29 17:18 Thomas Nichols
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Nichols @ 1997-10-29 17:18 UTC (permalink / raw)
  To: gnu-win32

Hello,
the __stdcall fixes worked great - thanks.

Now down to 2 problems:
1. Missing identifiers - can anyone tell me values for these?
critical:
LOCALE_SINTLSYMBOL
LOCALE_IINTLCURRDIGITS
WC_DIALOG

less urgent (can use win16 code)
WNDCLASSA
WIN32_FIND_DATAA
OPENFILENAMEA


2. Undefined references - here is a sample (172 altogether, moatly like
these). A WinMain MessageBox "Hello World" prog works fine with gcc -o
test.exe test.cpp -luser32
--- links and runs fine.

To build libzaf5.a I'm using
ar -ru libzaf5.a file1.o file2.o file 3.o...
ar -ru libzaf5.a file10.o file11.o file12.o
etc. - builds lib ok.
Then I do
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'
./libzaf5.a(w_window.o)(.text+0x4e4):w_window.cc: undefined reference to
`DeleteObject@4'
./libzaf5.a(w_window.o)(.text+0x30fe):w_window.cc: undefined reference to
`SelectPalette@12'
./libzaf5.a(w_window.o)(.text+0x310b):w_window.cc: undefined reference to
`SetTextColor@8'
./libzaf5.a(w_window.o)(.text+0x3118):w_window.cc: undefined reference to
`SetBkColor@8'
./libzaf5.a(w_window.o)(.text+0x3167):w_window.cc: undefined reference to
`SelectObject@8'
./libzaf5.a(w_window.o)(.text+0x3194):w_window.cc: undefined reference to
`PatBlt@24'
./libzaf5.a(w_window.o)(.text+0x31a1):w_window.cc: undefined reference to
`SelectObject@8'
./libzaf5.a(w_window.o)(.text+0x34e3):w_window.cc: undefined reference to
`SelectPalette@12'
./libzaf5.a(w_window.o)(.text+0x34ec):w_window.cc: undefined reference to
`RealizePalette@4'
./libzaf5.a(w_window.o)(.text+0x36fb):w_window.cc: undefined reference to
`SelectPalette@12'
./libzaf5.a(w_window.o)(.text+0x3704):w_window.cc: undefined reference to
`RealizePalette@4'
./libzaf5.a(w_winobj.o)(.text+0x24):w_winobj.cc: undefined reference to
`CreateRectRgn@16'
./libzaf5.a(w_winobj.o)(.text+0x65):w_winobj.cc: undefined reference to
`DeleteObject@4'
./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?

This is looking more possible than I thought - will post details of changes
reqd. once I'm done.

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

Thanks a lot,
Regards,
Tom.




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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-11-04 15:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-29 20:36 which libs to link Colin Peters
  -- strict thread matches above, loose matches on Subject: below --
1997-11-04  0:18 Pavel Tzekov
1997-11-04  2:29 ` Mikey
1997-11-04 15:45   ` Thomas Nichols
1997-11-01  7:18 Thomas Nichols
1997-10-29 17:18 Thomas Nichols

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).