I am trying the driver example after I read Mike Hall's aticle
<<SPOT the Geek and Windows CE Drivers>> in MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnembedded/html/embedded03042003.asp


The Driver project is compiled smoothly. Then I create a project for the
application--MyApp. It was created from a "Hello world" Project wizard.
I replaced the .cpp file with the file MyApp.cpp which Mike have given.
Next, I created a menu for this program.

But when I build it, it failed. the build output is:

---------------------------------------------------------------
MyApp.obj : error LNK2019: unresolved external symbol
CommandBar_InsertMenubar referenced in function "long __cdecl WndProc(struct
HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YAJPAUHWND__@@IIJ@Z)
MyApp.obj : error LNK2019: unresolved external symbol CommandBar_Create
referenced in function "long __cdecl WndProc(struct HWND__ *,unsigned
int,unsigned int,long)" (?WndProc@@YAJPAUHWND__@@IIJ@Z)
XIZANGRel/MyApp.exe : fatal error LNK1120: 2 unresolved externals
Error PB2505: Error executing link.exe.
---------------------------------------------------------------

By lookup MSDN, I found that the prototype of these two functions
CommandBar_InsertMenubar() and CommandBar_Create() are
defined in <commctrl.h>, but this header file have already been included.

So why cannot this project be built successully?

Should I add some features into my OS-image project?


Thank you!

Re: Link error to Mike Hall's driver sample. by Bruce

Bruce
Mon Oct 25 07:10:20 CDT 2004

You have a linker error, which has nothing to do with header files. MSDN
also tells you that you need to link with Commctrl.lib, did you do that?

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: Link error to Mike Hall's driver sample. by olol

olol
Mon Oct 25 08:39:45 CDT 2004

Oh, thanks!

Shamefully, I have no habit to include a external lib to my setting,
I take it for grant that when I inluce a header file, the corresponding
lib file will be included automatically!


"Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> wrote in
message news:eUnpauouEHA.2832@tk2msftngp13.phx.gbl...
> You have a linker error, which has nothing to do with header files. MSDN
> also tells you that you need to link with Commctrl.lib, did you do that?
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>