www.digitalmars.com         C & C++   DMDScript  

c++ - Missing definitions in commctrl.h

reply "Gary" <gedumer bcpl.net> writes:
The following definitions (plus others that I don't need just yet) are
missing from the commctrl.h file:

typedef struct tagINITCOMMONCONTROLSEX {
 DWORD dwSize;
 DWORD dwICC;
} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
#define ICC_WIN95_CLASSES 255
#define ICC_DATE_CLASSES 256
BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

I put them in my own header temporarily and everything resolves OK except
for the last one.

BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

This one can't be resolved during link. I get the following message:

link win+GUI,,,gdi32+user32+kernel32,d:\GUI\dmc\win/RC:win/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

GUI.obj(GUI)
 Error 42: Symbol Undefined
?InitCommonControlsEx  YGHPAUtagINITCOMMONCONTROLSEX
   Z (int stdcall InitCommonControlsEx(tagINITCOMMONCONTROLSEX *))

--- errorlevel 1

Can you help, please.

Thanks.

Gary
Mar 12 2003
next sibling parent reply "Nic Tiger" <nictiger progtech.ru> writes:
Try enclose function prototype with extern "C" { }.
(note the mangling of function name in linker output)

Nic Tiger.

"Gary" <gedumer bcpl.net> сообщил/сообщила в новостях следующее:
news:b4o4vj$28u3$1 digitaldaemon.com...
 The following definitions (plus others that I don't need just yet) are
 missing from the commctrl.h file:

 typedef struct tagINITCOMMONCONTROLSEX {
  DWORD dwSize;
  DWORD dwICC;
 } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
 #define ICC_WIN95_CLASSES 255
 #define ICC_DATE_CLASSES 256
 BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

 I put them in my own header temporarily and everything resolves OK except
 for the last one.

 BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

 This one can't be resolved during link. I get the following message:

 link win+GUI,,,gdi32+user32+kernel32,d:\GUI\dmc\win/RC:win/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 GUI.obj(GUI)
  Error 42: Symbol Undefined
 ?InitCommonControlsEx  YGHPAUtagINITCOMMONCONTROLSEX
    Z (int stdcall InitCommonControlsEx(tagINITCOMMONCONTROLSEX *))

 --- errorlevel 1

 Can you help, please.

 Thanks.

 Gary
Mar 12 2003
parent reply "Gary" <gedumer bcpl.net> writes:
Now I get...

GUI.obj(GUI)
 Error 42: Symbol Undefined _InitCommonControlsEx 4

Is there something else I can do?

Gary

"Nic Tiger" <nictiger progtech.ru> wrote in message
news:b4o5js$29h1$1 digitaldaemon.com...
 Try enclose function prototype with extern "C" { }.
 (note the mangling of function name in linker output)

 Nic Tiger.
Mar 12 2003
next sibling parent reply "Nic Tiger" <nictiger progtech.ru> writes:
You can now try to find where (what DLL) this function resides and then
create .def file for it and create import library via implib.exe.

Read DMC online help to learn more about .def files an implib.

Nic Tiger.

"Gary" <gedumer bcpl.net> сообщил/сообщила в новостях следующее:
news:b4o68f$2a2b$1 digitaldaemon.com...
 Now I get...

 GUI.obj(GUI)
  Error 42: Symbol Undefined _InitCommonControlsEx 4

 Is there something else I can do?

 Gary

 "Nic Tiger" <nictiger progtech.ru> wrote in message
 news:b4o5js$29h1$1 digitaldaemon.com...
 Try enclose function prototype with extern "C" { }.
 (note the mangling of function name in linker output)

 Nic Tiger.
Mar 12 2003
parent reply "Gary" <gedumer bcpl.net> writes:
Actually, this should be addressed by Walter Bright, since this is all part
of the win32api support that the compiler system should provide. Obviously,
this is something that slipped through the cracks. Hopefully, Walter will
read this and respond. Thanks for your suggestions though,

Gary.

"Nic Tiger" <nictiger progtech.ru> wrote in message
news:b4o6tc$2al2$1 digitaldaemon.com...
 You can now try to find where (what DLL) this function resides and then
 create .def file for it and create import library via implib.exe.

 Read DMC online help to learn more about .def files an implib.

 Nic Tiger.

 "Gary" <gedumer bcpl.net> сообщил/сообщила в новостях следующее:
 news:b4o68f$2a2b$1 digitaldaemon.com...
 Now I get...

 GUI.obj(GUI)
  Error 42: Symbol Undefined _InitCommonControlsEx 4

 Is there something else I can do?

 Gary

 "Nic Tiger" <nictiger progtech.ru> wrote in message
 news:b4o5js$29h1$1 digitaldaemon.com...
 Try enclose function prototype with extern "C" { }.
 (note the mangling of function name in linker output)

 Nic Tiger.
Mar 12 2003
parent Christof Meerwald <cmeerw web.de> writes:
On Wed, 12 Mar 2003 18:13:32 -0500, Gary wrote:
 Actually, this should be addressed by Walter Bright, since this is all part
 of the win32api support that the compiler system should provide. Obviously,
In the meantime you could have a look at http://cmeerw.org/prog/dm/ms_sdk.html on how to use the latest Platform SDK with DMC++. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Mar 13 2003
prev sibling parent "Walter" <walter digitalmars.com> writes:
That symbol is in \dm\lib\comctl32.lib. Need to add it to the list of
libraries presented to the linker.

"Gary" <gedumer bcpl.net> wrote in message
news:b4o68f$2a2b$1 digitaldaemon.com...
 Now I get...

 GUI.obj(GUI)
  Error 42: Symbol Undefined _InitCommonControlsEx 4

 Is there something else I can do?

 Gary

 "Nic Tiger" <nictiger progtech.ru> wrote in message
 news:b4o5js$29h1$1 digitaldaemon.com...
 Try enclose function prototype with extern "C" { }.
 (note the mangling of function name in linker output)

 Nic Tiger.
Mar 17 2003
prev sibling parent "Gary" <gedumer bcpl.net> writes:
Thanks to all who replied... I simply failed to link the comctl32.lib file.
Works great now.

Gary

"Gary" <gedumer bcpl.net> wrote in message
news:b4o4vj$28u3$1 digitaldaemon.com...
 The following definitions (plus others that I don't need just yet) are
 missing from the commctrl.h file:

 typedef struct tagINITCOMMONCONTROLSEX {
  DWORD dwSize;
  DWORD dwICC;
 } INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
 #define ICC_WIN95_CLASSES 255
 #define ICC_DATE_CLASSES 256
 BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

 I put them in my own header temporarily and everything resolves OK except
 for the last one.

 BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);

 This one can't be resolved during link. I get the following message:

 link win+GUI,,,gdi32+user32+kernel32,d:\GUI\dmc\win/RC:win/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 GUI.obj(GUI)
  Error 42: Symbol Undefined
 ?InitCommonControlsEx  YGHPAUtagINITCOMMONCONTROLSEX
    Z (int stdcall InitCommonControlsEx(tagINITCOMMONCONTROLSEX *))

 --- errorlevel 1

 Can you help, please.

 Thanks.

 Gary
Mar 14 2003