In order to make a custom DDraw project, I added the DirectDraw sample
project "DDEX4" in
Subprojects folder. Like CE 5, I had to add some lines in the "sources" file
of the project to specify the libraries (.h and .lib) needed by the program:

INCLUDES= \
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\inc;
\
C:\WINCE600\PUBLIC\IE\SDK\INC; \
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\oak\inc;
\
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\ddk\inc;
\
C:\WINCE600\PUBLIC\DIRECTX\SDK\SAMPLES\DDRAW\INCLUDE; \

TARGETLIBS= \
C:\WINCE600\PUBLIC\DIRECTX\OAK\LIB\X86\RETAIL\ddraw.lib \
C:\WINCE600\PUBLIC\DIRECTX\SDK\LIB\X86\RETAIL\ddutil.lib \
C:\WINCE600\PUBLIC\DIRECTX\SDK\LIB\X86\RETAIL\dxguid.lib \
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\lib\x86\retail\uuid.lib
\
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\lib\x86\retail\coredll.lib
\


It compiles, but doesn't link, returning the following errors:

BUILD: [01:0000000092:ERRORE] ddraw.lib(clip.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawClipper
BUILD: [01:0000000093:ERRORE] ddraw.lib(dd.obj) : error LNK2001: unresolved
external symbol _IID_IDDVideoPortContainer
BUILD: [01:0000000094:ERRORE] ddraw.lib(dd.obj) : error LNK2001: unresolved
external symbol _IID_IDirectDraw
BUILD: [01:0000000095:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawGammaControl
BUILD: [01:0000000096:ERRORE] ddraw.lib(control.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawGammaControl
BUILD: [01:0000000097:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawColorControl
BUILD: [01:0000000098:ERRORE] ddraw.lib(control.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawColorControl
BUILD: [01:0000000099:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawSurface
BUILD: [01:0000000100:ERRORE] ddraw.lib(vport.obj) : error LNK2001:
unresolved external symbol _IID_IDirectDrawVideoPort
BUILD: [01:0000000101:ERRORE] obj\x86\retail\Subproject1.exe : fatal error
LNK1120: 7 unresolved externals

Anyone can explain this?

Re: DirectDraw linking problem by K

K
Mon Feb 04 18:55:04 PST 2008

You should use $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\ddraw.lib rather than
hard coded the path.
And in fact, the macro $(_COMMONSDKROOT) will be replaced as
C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\
rather than
C:\WINCE600\PUBLIC\DIRECTX\OAK\LIB\X86\RETAIL\
You application, DXE4 is supposed to be link with the stub library of
ddraw.dll and the stub library is always generated under the CESYSGEN\SDK.
The LIB in PUBLIC\DirectX is the body of DDRAW.DLL which means it is for
generating the ddraw.dll in SYSGEN phase but not for linking with your app.

"Marco" <marcomalentacchiNOSPAM@tin.it> wrote in message
news:47a78ab5$0$37201$4fafbaef@reader3.news.tin.it...
> In order to make a custom DDraw project, I added the DirectDraw sample
> project "DDEX4" in
> Subprojects folder. Like CE 5, I had to add some lines in the "sources"
> file of the project to specify the libraries (.h and .lib) needed by the
> program:
>
> INCLUDES= \
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\inc;
> \
> C:\WINCE600\PUBLIC\IE\SDK\INC; \
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\oak\inc;
> \
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\ddk\inc;
> \
> C:\WINCE600\PUBLIC\DIRECTX\SDK\SAMPLES\DDRAW\INCLUDE; \
>
> TARGETLIBS= \
> C:\WINCE600\PUBLIC\DIRECTX\OAK\LIB\X86\RETAIL\ddraw.lib \
> C:\WINCE600\PUBLIC\DIRECTX\SDK\LIB\X86\RETAIL\ddutil.lib \
> C:\WINCE600\PUBLIC\DIRECTX\SDK\LIB\X86\RETAIL\dxguid.lib \
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\lib\x86\retail\uuid.lib
> \
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\lib\x86\retail\coredll.lib
> \
>
>
> It compiles, but doesn't link, returning the following errors:
>
> BUILD: [01:0000000092:ERRORE] ddraw.lib(clip.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawClipper
> BUILD: [01:0000000093:ERRORE] ddraw.lib(dd.obj) : error LNK2001:
> unresolved external symbol _IID_IDDVideoPortContainer
> BUILD: [01:0000000094:ERRORE] ddraw.lib(dd.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDraw
> BUILD: [01:0000000095:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawGammaControl
> BUILD: [01:0000000096:ERRORE] ddraw.lib(control.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawGammaControl
> BUILD: [01:0000000097:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawColorControl
> BUILD: [01:0000000098:ERRORE] ddraw.lib(control.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawColorControl
> BUILD: [01:0000000099:ERRORE] ddraw.lib(surf.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawSurface
> BUILD: [01:0000000100:ERRORE] ddraw.lib(vport.obj) : error LNK2001:
> unresolved external symbol _IID_IDirectDrawVideoPort
> BUILD: [01:0000000101:ERRORE] obj\x86\retail\Subproject1.exe : fatal error
> LNK1120: 7 unresolved externals
>
> Anyone can explain this?
>



Re: DirectDraw linking problem by Marco

Marco
Tue Feb 05 09:15:50 PST 2008

Perfect! Many thanks!!

"K. S. Huang" <k_Underln_s_Underln_huang_AT_yahoo_DOT_com> ha scritto nel
messaggio news:ujUwCK6ZIHA.5792@TK2MSFTNGP02.phx.gbl...
> You should use $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\ddraw.lib rather than
> hard coded the path.
> And in fact, the macro $(_COMMONSDKROOT) will be replaced as
> C:\WINCE600\OSDesigns\HorizonPCEX\HorizonPCEX\WINCE600\VIABSP_x86\cesysgen\sdk\
> rather than
> C:\WINCE600\PUBLIC\DIRECTX\OAK\LIB\X86\RETAIL\
> You application, DXE4 is supposed to be link with the stub library of
> ddraw.dll and the stub library is always generated under the CESYSGEN\SDK.
> The LIB in PUBLIC\DirectX is the body of DDRAW.DLL which means it is for
> generating the ddraw.dll in SYSGEN phase but not for linking with your
> app.