Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linker error

10 views
Skip to first unread message

Virg

unread,
Aug 28, 2007, 8:44:02 PM8/28/07
to
Am trying to include a Status bar in an existing Window compiled as a C++
program, and am receiving a linker error resulting from the use of
InitCommonControls() as well as CreateStatusWindow(). Since both of these are
obsolete I replaced them with InitCommonControlsEx() and CreateWindow().
The error persists for the InitCommonControls(). The CreateWindow() fails
even though it shows no linker error (returns NULL). Am fairly certain the
args used in CreateWindow() are valid. Have tried suggestions shown in the MS
linker error file (LNK2019).

Togusa

unread,
Nov 7, 2007, 6:23:03 PM11/7/07
to
Are you adding the "comctl32.lib" to the linker additional dependencies? You
can do this with
#pragma comment(lib, "comctl32.lib")
or from the project's properties.

Virg

unread,
Nov 8, 2007, 11:24:01 AM11/8/07
to
Yes this was added early on but to no avail. Added as property.
Have since resolved the problem buy am not sure as to how or why since I
tried so many things in an effort to solve this that I lost track of the
total changes. It seems that changing the code from C to C++ is what brought
all this on.

Virg

Virg

unread,
Nov 9, 2007, 10:34:02 AM11/9/07
to
I should point out that what seemed to finally resolve this issue was to
place comctl32.lib in "Additional Dependancies". It was originally placed in
Linker/General/ Additional Library Directories which does not work!! This
makes absolutely no sense to me as to why this should be. Spent many hours
trying to resolve this using trial and error approach since nothing in help
files is appropriate.

Togusa

unread,
Nov 9, 2007, 10:54:08 AM11/9/07
to
It doesn't work there 'cause it's called "additional library *DIRECTORIES*"
I already told you this in the last reply!
Have fun!
0 new messages