From: isenhand on 16 Mar 2010 03:14 Here's the latest instalment of my apparently never ending saga of trying to get things to link! My latest linker error is: error LNK2001: unresolved external symbol __imp_EnableWindow I would have thought that the USE_MFCUNICODE=1 or USE_MFC=1 should have taken care of this linker error but apparently not. I've tried both of them and tried generally different macros but all I get is different linker errors but this one does not go away. Any suggestions? Thanks.
From: Tim Roberts on 17 Mar 2010 01:43 isenhand <isenhand(a)discussions.microsoft.com> wrote: > >Here's the latest instalment of my apparently never ending saga of trying to >get things to link! >My latest linker error is: > >error LNK2001: unresolved external symbol __imp_EnableWindow > >I would have thought that the USE_MFCUNICODE=1 or USE_MFC=1 should have >taken care of this linker error but apparently not. Nope, EnableWindow is neither of those. It's part of the Win32 API, in user32.lib, as are virtually all of the windowing APIs. >I've tried both of them and tried generally different macros but all I >get is different linker errors but this one does not go away. Any suggestions? Post your "sources" file and we'll show you where to add the library. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: isenhand on 17 Mar 2010 02:41 TARGETNAME=AxisSnd TARGETTYPE=DYNLINK USE_LIBCMT = 1 #USE_MSVCRT=1 #USE_MFC=1 USE_MFCUNICODE=1 USE_ALT=1 USE_RTTI=1 USER_C_FLAGS=/MD USE_ATL=1 ATL_VER=71 UMDF_VERSION_MAJOR = 1 INCLUDES=$(INCLUDES);$(ATL_INC_PATH)\atl71;C:\WinDDK\7600.16385.1\inc\ddk;C:\WinDDK\7600.16385.1\inc\copied_altmfc;C:\Axis_sound_driver_project\04-code\Sound_Driver\Sound_Driver C_DEFINES = $(C_DEFINES) /D_UNICODE /DUNICODE /D_AFXDLL WIN32_WINNT_VERSION=$(LATEST_WIN32_WINNT_VERSION) _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP) NTDDI_VERSION=$(LATEST_NTDDI_VERSION) #MFC_LIBS=C:\WinDDK\7600.16385.1\lib\Mfc #WIN7_LIBS=C:\WinDDK\7600.16385.1\lib\win7\amd64 #ATL_LIBS=C:\WinDDK\7600.16385.1\lib\copied_atlmfc\amd64 DLLENTRY=_DllMainCRTStartup DLLDEF=exports.def SOURCES=\ AxisSnd.rc \ comsup.cpp \ dllsup.cpp \ driver.cpp \ device.cpp \ remotetarget.cpp \ axismediacontrol.cpp \ stdafx.cpp MSC_WARNING_LEVEL=/W4 TARGETLIBS=\ $(SDK_LIB_PATH)\strsafe.lib \ $(SDK_LIB_PATH)\kernel32.lib \ $(SDK_LIB_PATH)\advapi32.lib \ $(SDK_LIB_PATH)\oleaut32.lib \ NTTARGETFILE0=$(OBJ_PATH)\$(O)\AxisSnd.inf TARGET_DESTINATION=AxisSnd PASS0_BINPLACE=$(NTTARGETFILE0) # # This sets up the WPP preprocessor and tells it to scan internal.h to find # the trace function definition that's in there. # RUN_WPP= $(SOURCES) -dll -scan:internal.h "Tim Roberts" wrote: > isenhand <isenhand(a)discussions.microsoft.com> wrote: > > > >Here's the latest instalment of my apparently never ending saga of trying to > >get things to link! > >My latest linker error is: > > > >error LNK2001: unresolved external symbol __imp_EnableWindow > > > >I would have thought that the USE_MFCUNICODE=1 or USE_MFC=1 should have > >taken care of this linker error but apparently not. > > Nope, EnableWindow is neither of those. It's part of the Win32 API, in > user32.lib, as are virtually all of the windowing APIs. > > >I've tried both of them and tried generally different macros but all I > >get is different linker errors but this one does not go away. Any suggestions? > > Post your "sources" file and we'll show you where to add the library. > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. > . >
From: Tim Roberts on 18 Mar 2010 23:03 isenhand <isenhand(a)discussions.microsoft.com> wrote: > > >MSC_WARNING_LEVEL=/W4 > >TARGETLIBS=\ > $(SDK_LIB_PATH)\strsafe.lib \ > $(SDK_LIB_PATH)\kernel32.lib \ > $(SDK_LIB_PATH)\advapi32.lib \ > $(SDK_LIB_PATH)\oleaut32.lib \ Right there. Add: $(SDK_LIB_PATH)\user32.lib > >NTTARGETFILE0=$(OBJ_PATH)\$(O)\AxisSnd.inf > If this is a normal user-mode DLL, why do you have an INF? -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: isenhand on 19 Mar 2010 02:33
Cos I took the sources file from the toaster example that came with the driver kit and that had an inf file in the ...\umdf\Toastmon dir. I tried tio make the minimum amout of changes possible. > If this is a normal user-mode DLL, why do you have an INF? > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. > . > |