none
printoem.h Vista-64 bit compatibility? RRS feed

  • Question

  • Hi,

         I am currently trying to build the oemuni driver for Vista 64 bit edition.  Our driver already builds and has been tested on XP and Vista 32 bit editions using the latest WDK (6000) but when I switch to the Windows Vista x64 or Longhorn build enviroment, I recieve a linker error (LNK2001) that says OEMQueryFont and OEMQueryFontTree functions found in the printoem.h file which is included in the source through the precompiled header.  Is this a function I have to implement especially for Vista 64 bit edition, or is there some compatibility issues with the linker or libraries used by the linker?  The linker version is 8.00.50727.215 and I was wondering if this was a new bug.  THE FILES COMPILE FINE, it's just not linking properly.  Here is the 'build' command's output:

     

     

    Code Snippet

    BUILD: Computing Include file dependencies:

    BUILD: Examining c:\winddk\6000\src\print\ddihook directory tree for files to compile.

    before AssemblyIdentity_AfterReadAllSources

    after AssemblyIdentity_AfterReadAllSources

    skipping post pass 0 command

    Compiling c:\winddk\6000\src\print\ddihook\umode *************

    'nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS1 NOLINK=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=src\print\ddihook\umode MAKEDIR_LOWERCASE=c:\winddk\6000\src\print\ddihook\umode'

    c:\winddk\6000\src\print\ddihook\umode: TARGETPATH is ..\..

    cl.exe /Iamd64\ /I. /I.. /IC:\WinDDK\6000\inc\api\MFC42 /Ic:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64 /IC:\WinDDK\6000\inc\api /IC:\WinDDK\6000\inc\api /IC:\WinDDK\6000\inc\crt /D_WIN64 /D_AMD64_ /DAMD64 /DCONDITION_HANDLING=1 /DNT_INST=0 /DWIN32=100 /D_NT1X_=100 /DWINNT=1 /D_WIN32_WINNT=0x0600 /DWINVER=0x0600 /D_WIN32_IE=0x0700 /DWIN32_LEAN_AND_MEAN=1 /DDEVL=1 /D__BUILDMACHINE__=WinDDK /DNDEBUG /D_DLL=1 /D_MT=1 -DKERNEL_MODE -D_UNICODE -DUNICODE -DOEMCOM -DUSERMODE_DRIVER -DUSERMODE_DRIVER /DNTDDI_VERSION=0x06000000 /c /Zc:wchar_t- /Zl /Zp8 /Gy /W3 /Wp64 /WX /EHs-c- /GR- /GF /GS /Z7 /Oxs /GL /Z7 -DKMDF_MAJOR_VERSION=01 -DKMDF_MINOR_VERSION=005 /FIC:\WinDDK\6000\inc\api\warning.h /YlDYKNOWIPDRV /Ycprecomp.h /Fpobjfre_wlh_amd64\amd64\precomp.pch /Fo"objfre_wlh_amd64\amd64\precomp.obj" /Tp

    #include "precomp.h"

    Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.215 for x64

    Copyright (C) Microsoft Corporation. All rights reserved.

    cl

    /Iamd64\

    /I.

    /I..

    /IC:\WinDDK\6000\inc\api\MFC42

    /Ic:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64

    /IC:\WinDDK\6000\inc\api

    /IC:\WinDDK\6000\inc\api

    /IC:\WinDDK\6000\inc\crt

    /D_WIN64

    /D_AMD64_

    /DAMD64

    /DCONDITION_HANDLING=1

    /DNT_INST=0

    /DWIN32=100

    /D_NT1X_=100

    /DWINNT=1

    /D_WIN32_WINNT=0x0600

    /DWINVER=0x0600

    /D_WIN32_IE=0x0700

    /DWIN32_LEAN_AND_MEAN=1

    /DDEVL=1

    /D__BUILDMACHINE__=WinDDK

    /DNDEBUG

    /D_DLL=1

    /D_MT=1

    -DKERNEL_MODE

    -D_UNICODE

    -DUNICODE

    -DOEMCOM

    -DUSERMODE_DRIVER

    -DUSERMODE_DRIVER

    /DNTDDI_VERSION=0x06000000

    /c

    /Zc:wchar_t-

    /Zl

    /Zp8

    /Gy

    /W3

    /Wp64

    /WX

    /EHs-c-

    /GR-

    /GF

    /GS

    /Z7

    /Oxs

    /GL

    /Z7

    -DKMDF_MAJOR_VERSION=01

    -DKMDF_MINOR_VERSION=005

    /FIC:\WinDDK\6000\inc\api\warning.h

    /YlDYKNOWIPDRV /Ycprecomp.h /Fpobjfre_wlh_amd64\amd64\precomp.pch /Fo"objfre_wlh_amd64\amd64\precomp.obj"

    pch_hdr.src

    rc -l 409 -DSXS_PROCESSOR_ARCHITECTURE="""AMD64""" -DSXS_TARGET="""DYKNOWIPDRV.dll""" -DSYSTEM_COMPATIBLE_ASSEMBLY_NAME="""Microsoft.Windows.SystemCompatible""" -DLSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L"""Microsoft.Windows.SystemCompatible""" -DSXS_ASSEMBLY_VERSION="""""" /r /fo objfre_wlh_amd64\amd64\dyknowipdrv.res /D_WIN64 /D_AMD64_ /DAMD64 /DCONDITION_HANDLING=1 /DNT_INST=0 /DWIN32=100 /D_NT1X_=100 /DWINNT=1 /D_WIN32_WINNT=0x0600 /DWINVER=0x0600 /D_WIN32_IE=0x0700 /DWIN32_LEAN_AND_MEAN=1 /DDEVL=1 /D__BUILDMACHINE__=WinDDK /DNDEBUG /D_DLL=1 /D_MT=1 -DKERNEL_MODE -D_UNICODE -DUNICODE -DOEMCOM -DUSERMODE_DRIVER -DUSERMODE_DRIVER /DNTDDI_VERSION=0x06000000 /I.. /IC:\WinDDK\6000\inc\api\MFC42 /Ic:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64 /IC:\WinDDK\6000\inc\api /IC:\WinDDK\6000\inc\api /IC:\WinDDK\6000\inc\crt ..\dyknowipdrv.rc

    Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

    Copyright (C) Microsoft Corporation. All rights reserved.

    cl.exe @c:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64\cl.rsp

    Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.215 for x64

    Copyright (C) Microsoft Corporation. All rights reserved.

    cl /Fo"c:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64/"

    /FC

    /Iamd64\

    /I.

    /I..

    /IC:\WinDDK\6000\inc\api\MFC42

    /Ic:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64

    /IC:\WinDDK\6000\inc\api

    /IC:\WinDDK\6000\inc\api

    /IC:\WinDDK\6000\inc\crt

    /D_WIN64

    /D_AMD64_

    /DAMD64

    /DCONDITION_HANDLING=1

    /DNT_INST=0

    /DWIN32=100

    /D_NT1X_=100

    /DWINNT=1

    /D_WIN32_WINNT=0x0600

    /DWINVER=0x0600

    /D_WIN32_IE=0x0700

    /DWIN32_LEAN_AND_MEAN=1

    /DDEVL=1

    /D__BUILDMACHINE__=WinDDK

    /DNDEBUG

    /D_DLL=1

    /D_MT=1

    -DKERNEL_MODE

    -D_UNICODE

    -DUNICODE

    -DOEMCOM

    -DUSERMODE_DRIVER

    -DUSERMODE_DRIVER

    /DNTDDI_VERSION=0x06000000

    /c

    /Zc:wchar_t-

    /Zl

    /Zp8

    /Gy

    /W3

    /Wp64

    /WX

    /EHs-c-

    /GR-

    /GF

    /GS

    /Z7

    /Oxs

    /GL

    /Z7

    -DKMDF_MAJOR_VERSION=01

    -DKMDF_MINOR_VERSION=005

    /FIC:\WinDDK\6000\inc\api\warning.h

    /Yuprecomp.h

    /Fpobjfre_wlh_amd64\amd64\precomp.pch

    ..\dllentry.cpp ..\intrface.cpp ..\ddihook.cpp ..\enable.cpp ..\devmode.cpp

    dllentry.cpp

    intrface.cpp

    ddihook.cpp

    enable.cpp

    devmode.cpp

    link.exe /lib /nologo /out:..\..\amd64\DYKNOWIPDRV.lib @c:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64\nm92.tmp

    Creating library ..\..\amd64\DYKNOWIPDRV.lib and object ..\..\amd64\DYKNOWIPDRV.exp

    Linking c:\winddk\6000\src\print\ddihook\umode *************

    'nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDLL=1 MAKEDIR_RELATIVE_TO_BASEDIR=src\print\ddihook\umode MAKEDIR_LOWERCASE=c:\winddk\6000\src\print\ddihook\umode'

    c:\winddk\6000\src\print\ddihook\umode: TARGETPATH is ..\..

    link.exe /out:..\..\amd64\DYKNOWIPDRV.dll /machine:amd64 @c:\winddk\6000\src\print\ddihook\umode\objfre_wlh_amd64\amd64\nm94.tmp

    Microsoft (R) Incremental Linker Version 8.00.50727.215

    Copyright (C) Microsoft Corporation. All rights reserved.

    /ltcg

    /MERGE:_PAGE=PAGE

    /MERGE:_TEXT=.text

    /SECTION:INIT,d

    /OPT:REF

    /OPT:ICF

    /IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235

    /INCREMENTAL:NO

    /FULLBUILD

    /release

    /NODEFAULTLIB

    /WX

    /debug

    /debugtype:cv

    /version:6.0

    /osversion:6.0

    /debug

    /debugtype:cv,fixup,pdata

    /opt:nowin98

    C:\WinDDK\6000\lib\wlh\amd64\hotpatch.obj

    /functionpadmin:6

    /merge:.rdata=.text

    /pdbcompress

    /STACK:0x40000,0x1000

    /dll

    /base:0x70000000

    /subsystem:console,6.00

    /entry:_DllMainCRTStartup

    objfre_wlh_amd64\amd64\precomp.obj

    ..\..\amd64\DYKNOWIPDRV.exp

    objfre_wlh_amd64\amd64\dyknowipdrv.res

    objfre_wlh_amd64\amd64\dllentry.obj

    objfre_wlh_amd64\amd64\intrface.obj

    objfre_wlh_amd64\amd64\ddihook.obj

    objfre_wlh_amd64\amd64\enable.obj

    objfre_wlh_amd64\amd64\devmode.obj

    C:\WinDDK\6000\lib\crt\amd64\msvcrt.lib

    C:\WinDDK\6000\lib\wlh\amd64\uuid.lib

    C:\WinDDK\6000\lib\wlh\amd64\winspool.lib

    C:\WinDDK\6000\lib\wlh\amd64\user32.lib

    C:\WinDDK\6000\lib\wlh\amd64\kernel32.lib

    C:\WinDDK\6000\lib\wlh\amd64\advapi32.lib

    C:\WinDDK\6000\lib\wlh\amd64\umpdddi.lib

    C:\WinDDK\6000\lib\wlh\amd64\ntdll.lib

    C:\WinDDK\6000\lib\wlh\amd64\kernel32.lib

    C:\WinDDK\6000\lib\wlh\amd64\user32.lib

    enable.obj : error LNK2001: unresolved external symbol OEMQueryFont

    errors in directory c:\winddk\6000\src\print\ddihook\umode

    c:\winddk\6000\src\print\ddihook\umode\enable.obj : error LNK2001: unresolved external symbol OEMQueryFont

    enable.obj : error LNK2001: unresolved external symbol OEMQueryFontTree

    c:\winddk\6000\src\print\ddihook\umode\enable.obj : error LNK2001: unresolved external symbol OEMQueryFontTree

    ..\..\amd64\DYKNOWIPDRV.dll : fatal error LNK1120: 2 unresolved externals

    c:\winddk\6000\src\print\amd64\dyknowipdrv.dll : error LNK1120: 2 unresolved externals

     

    Friday, July 13, 2007 2:07 PM

Answers

All replies

  • Hi David,

       may you try to re ask to any of the Software Development for Windows Vista forums?

     

       I don't believe you'll find experts on that issue in the Architecture General space

    Wednesday, July 18, 2007 8:25 PM
  •      The problem was not any linker issue, it was the version of the oemuni sample source I was using.  The initial code I was given was supplied with the Windows XP DDK (before Vista).  Because of this there were a few functions in the Windows code were not x64 compatible. 

    Friday, August 17, 2007 12:02 PM