OpenGL项目出现错误:error LNK2019: unresolved external symbol _gluErrorString@4

错误如下:

rror LNK2019: unresolved external symbol _gluErrorString@4 referenced in function "public: static int __cdecl GLUtils::checkForOpenGLError(char const *,int)" (?checkForOpenGLError@GLUtils@@SAHPBDH@Z)
1>debug\\chapter05.exe : fatal error LNK1120: 1 unresolved externals


在头文件中加入:

#pragma comment(lib, "glu32.lib")

错误编译 error LNK2019: unresolved external symbol

03-25

工程在(用vs2008 Debug x64方式编译)总是编译不过去,出现以下错误:rn1>DXAviPlayer.obj : error LNK2019: unresolved external symbol "public: void __cdecl CCritSec::Unlock(void)" (?Unlock@CCritSec@@QEAAXXZ) referenced in function "private: static long __cdecl CDXAviPlayer::GrabAVIFrameThread(class CDXAviPlayer *)" (?GrabAVIFrameThread@CDXAviPlayer@@CAJPEAV1@@Z)rn1>SecureVFWWrapper.obj : error LNK2001: unresolved external symbol "public: void __cdecl CCritSec::Unlock(void)" (?Unlock@CCritSec@@QEAAXXZ)rn1>DXAviPlayer.obj : error LNK2019: unresolved external symbol "public: void __cdecl CCritSec::Lock(void)" (?Lock@CCritSec@@QEAAXXZ) referenced in function "private: static long __cdecl CDXAviPlayer::GrabAVIFrameThread(class CDXAviPlayer *)" (?GrabAVIFrameThread@CDXAviPlayer@@CAJPEAV1@@Z)rn1>SecureVFWWrapper.obj : error LNK2001: unresolved external symbol "public: void __cdecl CCritSec::Lock(void)" (?Lock@CCritSec@@QEAAXXZ)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CCritSec::~CCritSec(void)" (??1CCritSec@@QEAA@XZ) referenced in function "public: virtual __cdecl SecureVFWWrapperHelper::~SecureVFWWrapperHelper(void)" (??1SecureVFWWrapperHelper@@UEAA@XZ)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CCritSec::CCritSec(void)" (??0CCritSec@@QEAA@XZ) referenced in function "public: __cdecl SecureVFWWrapperHelper::SecureVFWWrapperHelper(void)" (??0SecureVFWWrapperHelper@@QEAA@XZ)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "void __cdecl FreeMediaType(struct _AMMediaType &)" (?FreeMediaType@@YAXAEAU_AMMediaType@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CMediaType::~CMediaType(void)" (??1CMediaType@@QEAA@XZ) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: void __cdecl CMediaType::SetSubtype(struct _GUID const *)" (?SetSubtype@CMediaType@@QEAAXPEBU_GUID@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: void __cdecl CMediaType::SetType(struct _GUID const *)" (?SetType@CMediaType@@QEAAXPEBU_GUID@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CMediaType::CMediaType(void)" (??0CMediaType@@QEAA@XZ) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "void __cdecl DbgLogInfo(unsigned long,unsigned long,char const *,...)" (?DbgLogInfo@@YAXKKPEBDZZ) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>x64\Debug\HiRainMDP.exe : fatal error LNK1120: 10 unresolved externalsrn1>Build log was saved at "file://d:\DirectXCodex64\NewDXUT_x64RmFmod\x64\Debug\BuildLog.htm"rn1>HiRainMDP - 13 error(s), 69 warning(s)rnrn在(用vs2008 Release x64方式编译)总是编译还是不过去,出现以下错误:rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "void __cdecl FreeMediaType(struct _AMMediaType &)" (?FreeMediaType@@YAXAEAU_AMMediaType@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CMediaType::~CMediaType(void)" (??1CMediaType@@QEAA@XZ) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: void __cdecl CMediaType::SetSubtype(struct _GUID const *)" (?SetSubtype@CMediaType@@QEAAXPEBU_GUID@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: void __cdecl CMediaType::SetType(struct _GUID const *)" (?SetType@CMediaType@@QEAAXPEBU_GUID@@@Z) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>SecureVFWWrapper.obj : error LNK2019: unresolved external symbol "public: __cdecl CMediaType::CMediaType(void)" (??0CMediaType@@QEAA@XZ) referenced in function "public: int __cdecl SecureVFWWrapper::BuildGraph(char const *)" (?BuildGraph@SecureVFWWrapper@@QEAAHPEBD@Z)rn1>x64\Release/HiRainMDP.exe : fatal error LNK1120: 5 unresolved externalsrn1>Build log was saved at "file://d:\DirectXCodex64\NewDXUT_x64RmFmod\x64\Release\BuildLog.htm"rn1>HiRainMDP - 6 error(s), 64 warning(s)rnrn工程使用了DirectShow。在(用vs2008 Debug Win32方式编译)可以编译过去,并且正常运行。在配置中我也配置了x64平台的Executable files、Include files和Library files

编译错误error LNK2019: unresolved external symbol,求解

06-25

今天编译一个工程,其中的一个mediastream工程(用vs2008以debug方式编译)总是编译不过去,该工程依赖DirectShow的BaseClasses.rnrn我用vs6.0以debug方式编译了BaseClasses.然后把下面的三个路径rnD:\Program Files\DXSDK\IncludernD:\Program Files\DXSDK\Samples\C++\DirectShow\BaseClassesrnD:\Program Files\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug (strmbasd.lib路径)rn分别添加到了mediastream对应的属性页中.rnrn但编译mediastream时出现输出下面的错误rn1>Generating Code...rn1>Linking...rn1>alaw.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specificationrn1> Creating library D:\Source\Source\SipPhoneWorkspace\Debug\mediastreamer2.lib and object D:\Source\Source\SipPhoneWorkspace\Debug\mediastreamer2.exprn1>dxfilter.obj : error LNK2019: unresolved external symbol "public: __thiscall CTransInPlaceFilter::CTransInPlaceFilter(wchar_t *,struct IUnknown *,struct _GUID const &,long *,bool)" (??0CTransInPlaceFilter@@QAE@PA_WPAUIUnknown@@ABU_GUID@@PAJ_N@Z) referenced in function "public: __thiscall CDXFilter::CDXFilter(struct IUnknown *,long *,int)" (??0CDXFilter@@QAE@PAUIUnknown@@PAJH@Z)rn1>dxfilter.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CTransformFilter::FindPin(wchar_t const *,struct IPin * *)" (?FindPin@CTransformFilter@@UAGJPB_WPAPAUIPin@@@Z)rn1>dxfilter.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::JoinFilterGraph(struct IFilterGraph *,wchar_t const *)" (?JoinFilterGraph@CBaseFilter@@UAGJPAUIFilterGraph@@PB_W@Z)rn1>dxfilter.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryVendorInfo(wchar_t * *)" (?QueryVendorInfo@CBaseFilter@@UAGJPAPA_W@Z)rn1>dxfilter.obj : error LNK2019: unresolved external symbol "void __stdcall DbgBreakPoint(wchar_t const *,wchar_t const *,int)" (?DbgBreakPoint@@YGXPB_W0H@Z) referenced in function "public: virtual long __thiscall CTransInPlaceFilter::GetMediaType(int,class CMediaType *)" (?GetMediaType@CTransInPlaceFilter@@UAEJHPAVCMediaType@@@Z)rn1>dxfilter.obj : error LNK2019: unresolved external symbol "public: __thiscall CTransInPlaceInputPin::CTransInPlaceInputPin(wchar_t *,class CTransInPlaceFilter *,long *,wchar_t const *)" (??0CTransInPlaceInputPin@@QAE@PA_WPAVCTransInPlaceFilter@@PAJPB_W@Z) referenced in function "public: __thiscall CDXFilterInPin::CDXFilterInPin(class CTransInPlaceFilter *,long *)" (??0CDXFilterInPin@@QAE@PAVCTransInPlaceFilter@@PAJ@Z)rn1>dxfilter.obj : error LNK2019: unresolved external symbol "void __stdcall DbgAssert(wchar_t const *,wchar_t const *,int)" (?DbgAssert@@YGXPB_W0H@Z) referenced in function "public: struct tagAM_SAMPLE2_PROPERTIES * __thiscall CBaseInputPin::SampleProps(void)" (?SampleProps@CBaseInputPin@@QAEPAUtagAM_SAMPLE2_PROPERTIES@@XZ)rn1>dxfilter.obj : error LNK2019: unresolved external symbol "public: __thiscall CMemAllocator::CMemAllocator(wchar_t *,struct IUnknown *,long *)" (??0CMemAllocator@@QAE@PA_WPAUIUnknown@@PAJ@Z) referenced in function "public: __thiscall CDXFilterAllocator::CDXFilterAllocator(class CDXFilterInPin *,long *)" (??0CDXFilterAllocator@@QAE@PAVCDXFilterInPin@@PAJ@Z)rn1>dxfilter.obj : error LNK2019: unresolved external symbol "public: __thiscall CMediaSample::CMediaSample(wchar_t *,class CBaseAllocator *,long *,unsigned char *,long)" (??0CMediaSample@@QAE@PA_WPAVCBaseAllocator@@PAJPAEJ@Z) referenced in function "public: virtual long __thiscall CDXFilterAllocator::Alloc(void)" (?Alloc@CDXFilterAllocator@@UAEJXZ)rn1>D:\Source\Source\SipPhoneWorkspace\Debug\mediastreamer2.dll : fatal error LNK1120: 9 unresolved externalsrn1>Build log was saved at "file://d:\Source\Source\Common\mediastreamer2\build\wince\Debug\BuildLog.htm"rn1>mediastreamer2 - 10 error(s), 4 warning(s)rn========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========rnrnrn请各位大侠支招!!!

error LNK2019: unresolved external symbol __imp__“报错

08-27

1>ReportError.obj : error LNK2019: unresolved external symbol __imp__PrintStrings referenced in function _ReportError@12rn1>ReportError.obj : error LNK2019: unresolved external symbol __imp__PrintMsg@8 referenced in function _ReportError@12rn1>F:\windows学习\API\ReportError\Debug\ReportError.exe : fatal error LNK1120: 2 unresolved externalsrn以上是我copy下来的报错,在这里说明一下:rn我定义了两个cpp文件,1.cpp和2.cpp,我的main()放在2.cpp中,在2.cpp中引用了函数PrintStringsrn和PrintMsg,而这两个函数是在1.cpp中定义的,我用的是VS2005,建立了一个win32基于控制台的程序,我把这两个文件都放在了Source File中,并通过头文件指明了引用关系。我不知道该如何处理这个报错!!!rn我是看着书上的程序自己调试的,我使用到了一个“Support.h”头文件,其定义如下:rn#if defined(UTILITY_3_0_EXPORTS)rn#define LIBSPEC _declspec(dllexport)rn#elif defined(__cplusplus)rn#define LIBSPEC extern "C" _declspec(dllimport) rn#elsern#define LIBSPEC _declspec(dllimport)rn#endifrnrn#define EMPTY _T("")rn#define YES _T("y")rn#define NO _T("n")rn#define CR 0x0Drn#define LF 0x0Arn#define TSIZE sizeof(TCHAR)rnrn/*limits and constants*/rn#define TYPE_FILE 1rn#define TYPE_DIR 2rn#define TYPE_DOT 3rnrn#define MAX_OPTIONS 20rn#define MAX_ARG 1000rn#define MAX_COMMAND_LINE MAX_PATH+50rnrn/*Commonly used functions*/rnLIBSPEC BOOL ConsolePrompt(LPCTSTR,LPTSTR,DWORD,BOOL);rn[color=#FF0000]LIBSPEC BOOL PrintStrings(HANDLE,...);rnLIBSPEC BOOL PrintMsg(HANDLE,LPCTSTR);[/color]rnLIBSPEC VOID ReportError(LPCTSTR,DWORD,BOOL);rnLIBSPEC VOID ReportException(LPCTSTR,DWORD);rnLIBSPEC DWORD Options(int,LPCTSTR*,LPCTSTR,...);rnLIBSPEC LPTSTR SkipArg(LPCTSTR);rnLIBSPEC VOID GetArgs(LPCTSTR,int *,LPTSTR *);rnLIBSPEC LPCTSTR wmemchr(LPCTSTR,TCHAR,DWORD);rnrn#ifdef _UNICODErn#define _tstrrchr wcsrchrrn#elsern#define _tstrrchr strrchrrn#endifrn#ifdef _UNICODErn#define _memtchr wmemchrrn#elsern#define _memtchr memchrrn#endifrnrn/*security functions*/rnLPSECURITY_ATTRIBUTES InitializeUnixSA(DWORD,LPTSTR,LPTSTR,LPDWORD,LPHANDLE);rnLPSECURITY_ATTRIBUTES InitializeAccessOnlySA(DWORD,LPTSTR,LPTSTR,LPDWORD,LPHANDLE);rnDWORD ReadFilePermissions(LPTSTR,LPTSTR,LPTSTR);rnBOOL ChangeFilePermissions(DWORD,LPTSTR,LPDWORD,LPDWORD);rnrn#define LUSIZE 1024rn#define ACCT_NAME_SIZE LUSIZErn

error LNK2019: unresolved external symbol __imp____glewActiveTexture错误解决

03-21

[code=text]rn1>Linking...rn1>gui.lib(skeletonview.obj) : error LNK2019: unresolved external symbol __imp____glewActiveTexture referenced in function "protected: virtual void __thiscall SkeletonView::draw(void)" (?draw@SkeletonView@@MAEXXZ)rn1>gui.lib(skeletonview.obj) : error LNK2019: unresolved external symbol __imp____glewUniform1i referenced in function "protected: virtual void __thiscall SkeletonView::draw(void)" (?draw@SkeletonView@@MAEXXZ)rn1>gui.lib(skeletonview.obj) : error LNK2019: unresolved external symbol __imp____glewUniformMatrix4fv referenced in function "protected: virtual void __thiscall SkeletonView::draw(void)" (?draw@SkeletonView@@MAEXXZ)rn1>gui.lib(depthrendertarget.obj) : error LNK2019: unresolved external symbol __imp____glewDeleteRenderbuffersEXT referenced in function "public: __thiscall DepthRenderTarget::~DepthRenderTarget(void)" (??1DepthRenderTarget@@QAE@XZ)rn1>gui.lib(depthrendertarget.obj) : error LNK2019: unresolved external symbol __imp____glewBindFramebufferEXT referenced in function "public: __thiscall DepthRenderTarget::~DepthRenderTarget(void)" (??1DepthRenderTarget@@QAE@XZ)rn1>gui.lib(depthrendertarget.obj) : error LNK2019: unresolved external symbol __imp____glewDeleteFramebuffersEXT referenced in function "public: __thiscall DepthRenderTarget::~DepthRenderTarget(void)" (??1DepthRenderTarget@@QAE@XZ)rn1>gui.lib(depthrendertarget.obj) : error LNK2019: unresolved external symbol __imp____glewCheckFramebufferStatusEXT referenced in function "public: __thrn[/code]rnadditional library directories加上了glew32.lib所在的文件夹,也解决不了问题。rn该怎么办呢?

error LNK2019: unresolved external symbol _F30AUSBDRIVER_DispatchPnp@8 reference

09-30

在做USB驱动开发,出现如下问题,请教大师rnrn将PNP函数放到一个独立的cpp文件中出现“标题”错误,如将此函数放到主函数中则没有错误,求解释:rnrn主函数 usb.cpp内容:rnrn#ifdef __cplusplusrnextern "C" rn#endifrn#include rn#include rn#ifdef __cplusplusrn; rn#endifrnrn#include "F30a_UsbDriver.h"rn#include "F30a_Pnp.h"rnrn#ifdef __cplusplusrnnamespace rn#endifrnPDRIVER_OBJECT pdoGlobalDrvObj = 0;rn#ifdef __cplusplusrn; // anonymous namespacern#endifrnrn#ifdef __cplusplusrnextern "C" rn#endifrnNTSTATUS DriverEntry(rn IN OUT PDRIVER_OBJECT DriverObject,rn IN PUNICODE_STRING RegistryPathrn )rnrn PDEVICE_OBJECT pdoDeviceObj = 0;rn NTSTATUS status = STATUS_UNSUCCESSFUL;rn pdoGlobalDrvObj = DriverObject; rn rn DriverObject->MajorFunction[IRP_MJ_PNP] = F30AUSBDRIVER_DispatchPnp; rnrn return STATUS_SUCCESS;rnrn#ifdef __cplusplusrn; // extern "C"rn#endifrnrnF30a_Pnp.h和F30a_Pnp.cpp内容如下:rn.h文件内容:rn#ifndef _F30A_PNP_Hrn#define _F30A_PNP_Hrnextern "C"rnNTSTATUS F30AUSBDRIVER_DispatchPnp(rn IN PDEVICE_OBJECT DeviceObject,rn IN PIRP Irprn );rn#endifrnrn.cpp文件内容:rn#include "F30a_Pnp.h"rnrnNTSTATUS F30AUSBDRIVER_DispatchPnp(rn IN PDEVICE_OBJECT DeviceObject,rn IN PIRP Irprn )rnrn NTSTATUS status = STATUS_SUCCESS;rn return status;rnrnrn如果将F30AUSBDRIVER_DispatchPnp函数放到usb.cpp中,是没有任何问题的,求原因

VS2013 ERROR LNK2019: unresolved external symbol

12-27

編譯時遇到錯誤, 文件都有加進Project, 不知道哪裏出問題, 部分代碼和完整錯誤提示如下.rnrncontext.hrn[code=c]#pragma oncern#include rn#include "loadVulkanAPI.h"rnrnvoid createInstance();rnvoid createDevice();rn... // 省略[/code]rnrncontext.cpprn[code=c]#include "context.h"rn#include "config.h"rn#include rnrnvoid createInstance()rnrn loadVulkanBaseAPI();rn ... // 省略rn vkSuccessOrDie(vkCreateInstance(&instanceCreateInfo, NULL, &instance), "Failed to create instance");rn loadVulkanInstanceAPI(instance);rn ... // 省略rnrnrnvoid createDevice()rnrn ... // 省略rn vkSuccessOrDie(vkCreateDevice(gpu, &deviceCreateInfo, NULL, &device), "Failed to create Vulkan Device");rn loadVulkanDeviceAPI(device);rnrn // Gather physical device memory propertiesrn vkGetPhysicalDeviceMemoryProperties(gpu, &deviceMemProps);rn vkGetDeviceQueue(device, 0, 0, &graphicsQueue);rnrn... // 省略[/code]rnrnloadVulkanAPI.hrn[code=c]#pragma oncern#define VK_USE_PLATFORM_WIN32_KHRrn#define VK_NO_PROTOTYPESrn#include "vulkan/vulkan.h"rn#include "NativeLibrary.h"rn#include "debugOutput.h"rnrnbool loadVulkanBaseAPI();rnbool loadVulkanInstanceAPI(VkInstance instance); rnbool loadVulkanDeviceAPI(VkDevice device);rn... // 省略[/code]rnrnloadVulkanAPI.cpprn[code=c]#include "loadVulkanAPI.h"rnrn#define PVR_STR(x) #xrn#define PVR_VULKAN_GET_INSTANCE_POINTER(instance, function_name) vk##function_name = (PFN_vk##function_name)vkGetInstanceProcAddr(instance, "vk" PVR_STR(function_name));rn#define PVR_VULKAN_GET_DEVICE_POINTER(device, function_name) vk##function_name = (PFN_vk##function_name)vkGetDeviceProcAddr(device, "vk" PVR_STR(function_name));rnrnstatic NativeLibrary vkLib("vulkan-1.dll");rnrnbool initVulkan()rnrn vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)vkLib.getFunction("vkGetInstanceProcAddr");rn vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)vkLib.getFunction("vkEnumerateInstanceExtensionProperties");rn vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties)vkLib.getFunction("vkEnumerateInstanceLayerProperties");rn vkCreateInstance = (PFN_vkCreateInstance)vkLib.getFunction("vkCreateInstance");rn vkDestroyInstance = (PFN_vkDestroyInstance)vkLib.getFunction("vkDestroyInstance");rn return true;rnrnrnbool initVulkanInstance(VkInstance instance)rnrn PVR_VULKAN_GET_INSTANCE_POINTER(instance, EnumerateDeviceLayerProperties);rn ... // 省略rn return true;rnrnrnbool initVulkanDevice(VkDevice device)rnrn PVR_VULKAN_GET_DEVICE_POINTER(device, CreateRenderPass);rn ... // 省略rn return true;rnrn...// 省略[/code]rnrn錯誤Outputrn[code=text]1>context.obj : error LNK2019: unresolved external symbol "bool __cdecl loadVulkanBaseAPI(void)" (?loadVulkanBaseAPI@@YA_NXZ) referenced in function "void __cdecl createInstance(void)" (?createInstance@@YAXXZ)rn1>context.obj : error LNK2019: unresolved external symbol "bool __cdecl loadVulkanInstanceAPI(struct VkInstance_T *)" (?loadVulkanInstanceAPI@@YA_NPAUVkInstance_T@@@Z) referenced in function "void __cdecl createInstance(void)" (?createInstance@@YAXXZ)rn1>context.obj : error LNK2019: unresolved external symbol "bool __cdecl loadVulkanDeviceAPI(struct VkDevice_T *)" (?loadVulkanDeviceAPI@@YA_NPAUVkDevice_T@@@Z) referenced in function "void __cdecl createDevice(void)" (?createDevice@@YAXXZ)[/code]

error LNK2019: unresolved external symbol __imp__报错

08-28

我定义了外部的DLL,定义如下rnlib.hrn[code=C/C++]rnextern "C"_declspec(dllexport) bool PrintStrings(HANDLE hOut,...);rnextern "C"_declspec(dllexport) bool PrintMsg(HANDLE hOut,LPCTSTR pMsg);rn[/code]rnlib.cpprn[code=C/C++]#include"Envirmnt.h"rn#includern#includern#includern#includern#include"lib.h"rnrn//write message the output handlern/*rnPrintString:该函数具有不定的参数列表,rnva_list 定义了一个保存可变参数列表的变量,它将指向一个串结构rnva_start 将特定参数之后的参数列表保存到va_list指向的串结构rnva_arg 从串结构中取回一个制定类型的元素返回,并指向串中的下一个元素rnWriteConsole 将字符串写入制定的控制台字符缓冲rn*/rnrnbool PrintStrings(HANDLE hOut,...)rnrn DWORD MsgLen,Count;rn LPCTSTR pMsg;rn va_list pMsgList;//current message stringrn va_start(pMsgList,hOut);//start processing the messagern while((pMsg=va_arg(pMsgList,LPCTSTR))!=NULL)rn rn MsgLen=_tcslen(pMsg);rn if(!WriteConsole(hOut,pMsg,MsgLen,&Count,NULL)&&!WriteFile(hOut,pMsg,MsgLen*sizeof(TCHAR),&Count,NULL))rn rn return false;rn rn rn va_end(pMsgList);rn return true;rnrnrnrnrnbool PrintMsg(HANDLE hOut,LPCTSTR pMsg)rnrn return PrintStrings(hOut,pMsg,NULL);rnrnrnrn/*prompt the user at the console and get a response*/rnbool ConsolePrompt(LPCTSTR pPromptMsg,LPTSTR pResponse,DWORD MaxTchar,bool Echo)rnrn HANDLE hStdIn,hStdOut;rn DWORD TcharIn,EchoFlag;rn bool Success;rn hStdIn=CreateFile(_T("CONIN$"),GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);rn hStdOut=CreateFile(_T("CONOUT$"),GENERIC_WRITE,0,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);rn EchoFlag=Echo?ENABLE_ECHO_INPUT:0;rn Success=SetConsoleMode(hStdIn,ENABLE_LINE_INPUT|EchoFlag|ENABLE_PROCESSED_INPUT)&&SetConsoleMode(hStdOut,ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)&&PrintStrings(hStdOut,pPromptMsg)&&ReadConsole(hStdIn,pResponse,MaxTchar,&TcharIn,NULL);rn if(Success)rn rn pResponse[TcharIn-2]='\0';rn rn CloseHandle(hStdIn);rn CloseHandle(hStdOut);rn return Success;rnrn[/code]rnReportError是要调用该DLL的一个工程,我将DLL和lib都考到了ReportError的路径中,还是报错rn[code=C/C++]rn#pragma comment(lib,"PrintDll.lib")rn#include"EvryThng.h"rnrnVOID ReportError(LPCTSTR UserMessage,DWORD ExitCode,BOOL PrintErrorMsg);rnint _tmain()rnrn ReportError("hello",1,true);rn return 0;rnrnrnVOID ReportError(LPCTSTR UserMessage,DWORD ExitCode,BOOL PrintErrorMsg)rnrn DWORD eMsgLen,LastErr=GetLastError();rn LPTSTR lpvSysMsg;rn HANDLE hStdErr=GetStdHandle(STD_ERROR_HANDLE);rn PrintMsg(hStdErr,UserMessage);rn if(PrintErrorMsg)rn rn eMsgLen=FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,NULL,LastErr,MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),(LPTSTR)&lpvSysMsg,0,NULL);rn PrintStrings(hStdErr,_T("\n"),lpvSysMsg,_T("\n"),NULL);rn HeapFree(GetProcessHeap(),0,lpvSysMsg);rn rn if(ExitCode>0)rn rn ExitProcess(ExitCode);rn rn elsern return ;rnrn[/code]rnEvryThng.h的定义: rn[code=C/C++] #include"Envirmnt.h" #include #include #include #include #include"Support.h" #ifdef _MT #include #if !defined(_Wp64) #define DWORD_PTR DWORD #define LONG_PTR LONG #define INT_PTR INT #endif #endifrn[/code]rnrnSupport.h的定义:rnrn[code=C/C++]rnrn #if defined(PRINTDLL_EXPORTS) #define LIBSPEC _declspec(dllexport) #elif defined(__cplusplus) #define LIBSPEC extern "C" _declspec(dllimport) #else #define LIBSPEC _declspec(dllimport) #endif #define EMPTY _T("") #define YES _T("y") #define NO _T("n") #define CR 0x0D #define LF 0x0A #define TSIZE sizeof(TCHAR) /*limits and constants*/ #define TYPE_FILE 1 #define TYPE_DIR 2 #define TYPE_DOT 3 #define MAX_OPTIONS 20 #define MAX_ARG 1000 #define MAX_COMMAND_LINE MAX_PATH+50 /*Commonly used functions*/ LIBSPEC BOOL ConsolePrompt(LPCTSTR,LPTSTR,DWORD,BOOL); LIBSPEC BOOL PrintStrings(HANDLE,...); LIBSPEC BOOL PrintMsg(HANDLE,LPCTSTR); LIBSPEC VOID ReportError(LPCTSTR,DWORD,BOOL); LIBSPEC VOID ReportException(LPCTSTR,DWORD); LIBSPEC DWORD Options(int,LPCTSTR*,LPCTSTR,...); LIBSPEC LPTSTR SkipArg(LPCTSTR); LIBSPEC VOID GetArgs(LPCTSTR,int *,LPTSTR *); LIBSPEC LPCTSTR wmemchr(LPCTSTR,TCHAR,DWORD); #ifdef _UNICODE #define _tstrrchr wcsrchr #else #define _tstrrchr strrchr #endif #ifdef _UNICODE #define _memtchr wmemchr #else #define _memtchr memchr #endif /*security functions*/ LPSECURITY_ATTRIBUTES InitializeUnixSA(DWORD,LPTSTR,LPTSTR,LPDWORD,LPHANDLE); LPSECURITY_ATTRIBUTES InitializeAccessOnlySA(DWORD,LPTSTR,LPTSTR,LPDWORD,LPHANDLE); DWORD ReadFilePermissions(LPTSTR,LPTSTR,LPTSTR); BOOL ChangeFilePermissions(DWORD,LPTSTR,LPDWORD,LPDWORD); #define LUSIZE 1024 #define ACCT_NAME_SIZE LUSIZErnrn[/code]rnrn

error LNK2019: unresolved external symbol的问题

04-12

小弟初学VC,目前正在研究用VC++和Windows DDK来开发打印虚拟驱动程序,出力成一个Tiff文件.rn目前编译后出现以下错误rndi2tiff.obj : error LNK2019: unresolved external symbol _TIFFClose@4 referenced in function "bool __stdcall TIFFEndDoc(void)" (?TIFFEndDoc@@YG_NXZ)rnddi2tiff.obj : error LNK2019: unresolved external symbol _TIFFWriteDirectory@4 referenced in function "bool __stdcall TIFFAddPage(struct _SURFOBJ *,bool)" (?TIFFAddPage@@YG_NPAU_SURFOBJ@@_N@Z)rnddi2tiff.obj : error LNK2019: unresolved external symbol _TIFFOpen@8 referenced in function "bool __stdcall TIFFAddPage(struct _SURFOBJ *,bool)" (?TIFFAddPage@@YG_NPAU_SURFOBJ@@_N@Z)rnddi2tiff.obj : error LNK2019: unresolved external symbol _TIFFWriteScanline@16 referenced in function "void __stdcall TIFFWrite(char *)" (?TIFFWrite@@YGXPAD@Z)rntifflib.lib(tif_win3.obj) : error LNK2019: unresolved external symbol _fstat referenced in function __tiffSizeProcrnf:\vss\00.work\00.test\tiffprinter\src\i386\tiffprinteruni.dll : error LNK1120: 5 unresolved externalsrn请各位高手指点迷津,函数TIFFClose,TIFFWriteDirectory,TIFFOpen,TIFFWriteScanline都在Tiffio.h中有定义,并且TiffSetField可以编译通过,如果把Tiffio.h文件中的extern "C"去掉,则TiffSetField也找不到了,它们之间的不同点是TiffSetField是__cdecl的调用方式,其它的调用方式是__stdcall,请问应该如何修改才能解决该问题?rnrn#pragma comment( lib, "***.lib" )这个方法已经试过了,不好用,本人建的是makefile工程.rn

ACE的"error LNK2019: unresolved external symbol"链接错误

09-21

我下的是ACE5.5版本,编译用的是“ACE_Static.sln”文件,选择的“Release”,按照《中篇:ACE程序员教程》里的第一个例子写好程序,头文件和库文件路径都设好了,附加库文件也添加了“ACEs.lib”,链接报错。为了排除设置问题,我在VS的命令提示符下用link命令手动链接,还是同样的错误。rnrnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_SOCK_Acceptor::~ACE_SOCK_Acceptor(void)" (__imp_??1ACE_SOCK_Acceptor@@QAE@XZ) referenced in function $L28134rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_SOCK_Stream::~ACE_SOCK_Stream(void)" (__imp_??1ACE_SOCK_Stream@@QAE@XZ) referenced in function $L28134rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall ACE_INET_Addr::~ACE_INET_Addr(void)" (__imp_??1ACE_INET_Addr@@UAE@XZ) referenced in function $L28134rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_SOCK_Stream::ACE_SOCK_Stream(void)" (__imp_??0ACE_SOCK_Stream@@QAE@XZ) referenced in function "public: __thiscall Server::Server(int)" (??0Server@@QAE@H@Z)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_SOCK_Acceptor::ACE_SOCK_Acceptor(class ACE_Addr const &,int,int,int,int)" (__imp_??0ACE_SOCK_Acceptor@@QAE@ABVACE_Addr@@HHHH@Z) referenced in function "public: __thiscall Server::Server(int)" (??0Server@@QAE@H@Z)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_INET_Addr::ACE_INET_Addr(void)" (__imp_??0ACE_INET_Addr@@QAE@XZ) referenced in function "public: __thiscall Server::Server(int)" (??0Server@@QAE@H@Z)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_INET_Addr::ACE_INET_Addr(unsigned short,unsigned int)" (__imp_??0ACE_INET_Addr@@QAE@GI@Z) referenced in function "public: __thiscall Server::Server(int)" (??0Server@@QAE@H@Z)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall ACE_SOCK_Stream::close(void)" (__imp_?close@ACE_SOCK_Stream@@QAEHXZ) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl ACE_Log_Msg::log(enum ACE_Log_Priority,char const *,...)" (__imp_?log@ACE_Log_Msg@@QAAHW4ACE_Log_Priority@@PBDZZ) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall ACE_Log_Msg::conditional_set(char const *,int,int,int)" (__imp_?conditional_set@ACE_Log_Msg@@QAEXPBDHHH@Z) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall ACE_SOCK_Stream::recv_n(void *,unsigned int,int,class ACE_Time_Value const *,unsigned int *)const " (__imp_?recv_n@ACE_SOCK_Stream@@QBEHPAXIHPBVACE_Time_Value@@PAI@Z) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class ACE_Log_Msg * __cdecl ACE_Log_Msg::instance(void)" (__imp_?instance@ACE_Log_Msg@@SAPAV1@XZ) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl ACE_Log_Msg::last_error_adapter(void)" (__imp_?last_error_adapter@ACE_Log_Msg@@SAHXZ) referenced in function "public: int __thiscall Server::handle_connection(void)" (?handle_connection@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall ACE_INET_Addr::get_host_name(void)const " (__imp_?get_host_name@ACE_INET_Addr@@QBEPBDXZ) referenced in function "public: int __thiscall Server::accept_connections(void)" (?accept_connections@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall ACE_SOCK_Acceptor::accept(class ACE_SOCK_Stream &,class ACE_Addr *,class ACE_Time_Value *,int,int)const " (__imp_?accept@ACE_SOCK_Acceptor@@QBEHAAVACE_SOCK_Stream@@PAVACE_Addr@@PAVACE_Time_Value@@HH@Z) referenced in function "public: int __thiscall Server::accept_connections(void)" (?accept_connections@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall ACE_Time_Value::ACE_Time_Value(long,long)" (__imp_??0ACE_Time_Value@@QAE@JJ@Z) referenced in function "public: int __thiscall Server::accept_connections(void)" (?accept_connections@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned short __thiscall ACE_INET_Addr::get_port_number(void)const " (__imp_?get_port_number@ACE_INET_Addr@@QBEGXZ) referenced in function "public: int __thiscall Server::accept_connections(void)" (?accept_connections@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall ACE_SOCK::get_local_addr(class ACE_Addr &)const " (__imp_?get_local_addr@ACE_SOCK@@QBEHAAVACE_Addr@@@Z) referenced in function "public: int __thiscall Server::accept_connections(void)" (?accept_connections@Server@@QAEHXZ)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl ace_os_main_i(class ACE_Main_Base &,int,char * * const)" (__imp_?ace_os_main_i@@YAHAAVACE_Main_Base@@HQAPAD@Z) referenced in function _mainrnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl ACE_OS::atoi(char const *)" (__imp_?atoi@ACE_OS@@YAHPBD@Z) referenced in function "int __cdecl ace_main_i(int,char * * const)" (?ace_main_i@@YAHHQAPAD@Z)rnace_1 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ACE_OS::exit(int)" (__imp_?exit@ACE_OS@@YAXH@Z) referenced in function "int __cdecl ace_main_i(int,char * * const)" (?ace_main_i@@YAHHQAPAD@Z)rnace_1 fatal error LNK1120: 21 unresolved externalsrnrn

error LNK2019: unresolved external symbol 求解

11-28

> 报错如下:rn[code=text]1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CHiidoClt::start(void)" (?start@CHiidoClt@@QAE_NXZ) referenced in function "void __cdecl doit(int,class std::basic_string,class std::allocator >,class std::basic_string,class std::allocator >)" (?doit@@YAXHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)rn1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CHiidoClt::set_username(class std::basic_string,class std::allocator >)" (?set_username@CHiidoClt@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl doit(int,class std::basic_string,class std::allocator >,class std::basic_string,class std::allocator >)" (?doit@@YAXHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)rn1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CHiidoClt::set_password(class std::basic_string,class std::allocator >)" (?set_password@CHiidoClt@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl doit(int,class std::basic_string,class std::allocator >,class std::basic_string,class std::allocator >)" (?doit@@YAXHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)rn1>F:\MyProject\HiidoClt\Debug\HiidoClt.exe : fatal error LNK1120: 3 unresolved externalsrn[/code]rnrn大致意思是说:无法解析的外部符号 start()、set_username()、set_password() 在  doit() 函数中引用。。。rn其实就是说找不到这些函数定义。。。 [img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/10.gif][/img]rnrnrn> 上下文如下:rn[img=http://img.bbs.csdn.net/upload/201611/28/1480335067_744685.gif][/img]rnrn找不到那里问题。。。。 不知为什么连接器会报找不到符号错误。。。明明符号命名和参数都是一致的 头文件也包含的 [img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/12.gif][/img]rn

error LNK2019:unresolved external error

11-09

链接时出现以下无法解析的外部错误rnrnrnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Blit_Init referenced in function "public: __thiscall CWTSPPlayerVideoEngine::CWTSPPlayerVideoEngine(void)" (??0CWTSPPlayerVideoEngine@@QAE@XZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Advanced_Init referenced in function "public: __thiscall CWTSPPlayerVideoEngine::CWTSPPlayerVideoEngine(void)" (??0CWTSPPlayerVideoEngine@@QAE@XZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Platform_Init referenced in function "public: __thiscall CWTSPPlayerVideoEngine::CWTSPPlayerVideoEngine(void)" (??0CWTSPPlayerVideoEngine@@QAE@XZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__String_Init referenced in function "public: __thiscall CWTSPPlayerVideoEngine::CWTSPPlayerVideoEngine(void)" (??0CWTSPPlayerVideoEngine@@QAE@XZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__NodeEnum referenced in function "private: unsigned long __thiscall CWTSPPlayerVideoEngine::LoadVideoDecode(void)" (?LoadVideoDecode@CWTSPPlayerVideoEngine@@AAEKXZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__String_Done referenced in function "private: void __thiscall CWTSPPlayerVideoEngine::PluginUnload(void)" (?PluginUnload@CWTSPPlayerVideoEngine@@AAEXXZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Platform_Done referenced in function "private: void __thiscall CWTSPPlayerVideoEngine::PluginUnload(void)" (?PluginUnload@CWTSPPlayerVideoEngine@@AAEXXZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Advanced_Done referenced in function "private: void __thiscall CWTSPPlayerVideoEngine::PluginUnload(void)" (?PluginUnload@CWTSPPlayerVideoEngine@@AAEXXZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__Blit_Done referenced in function "private: void __thiscall CWTSPPlayerVideoEngine::PluginUnload(void)" (?PluginUnload@CWTSPPlayerVideoEngine@@AAEXXZ)rnWTSPPlayerVideoEngine.obj : error LNK2019: unresolved external symbol __imp__NodeIsClass referenced in function "private: void __thiscall CWTSPPlayerVideoEngine::GetMp4NodeFunction(void)" (?GetMp4NodeFunction@CWTSPPlayerVideoEngine@@AAEXXZ)rnemulatorDbg/WTSPPlayer.exe : fatal error LNK1120: 10 unresolved externalsrnrn请问高手问题产生的原因?

求助:error LNK2019: unresolved external symbol错误【VC++ 2005】

05-22

编译环境:VS2005 + XP sp2rnrn代码如下:rnrnint AudioInfo::OnCreate(LPCREATESTRUCT lpCreateStruct)rnrn if (CDialog::OnCreate(lpCreateStruct) == -1)rn return -1;rn int wavedevice,mididevice;rn WAVEOUTCAPS wavecap;rn MIDIOUTCAPS midicap;rn wavedevice=(int)waveOutGetNumDevs();rn mididevice=(int)midiOutGetNumDevs();rn if(wavedevice==0)rn rn SetDlgItemText(Edit_WaveInfo,"没有发现波形设备");rn rn elsern rn waveOutGetDevCaps(0,&wavecap,sizeof(WAVEOUTCAPS));rn SetDlgItemText(Edit_WaveInfo,wavecap.szPname);rn rn if(mididevice==0)rn rn SetDlgItemText(Edit_MIDIInfo,"没有发现MIDI设备");rn rn elsern rn midiOutGetDevCaps(0,&midicap,sizeof(MIDIOUTCAPS));rn SetDlgItemText(Edit_MIDIInfo,midicap.szPname);rn rn return 0;rnrnrn错误信息如下:rn------ Build started: Project: FFT, Configuration: Debug Win32 ------rnLinking...rnAudioInfo.obj : error LNK2019: unresolved external symbol __imp__midiOutGetDevCapsA@12 referenced in function "public: int __thiscall AudioInfo::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@AudioInfo@@QAEHPAUtagCREATESTRUCTA@@@Z)rnAudioInfo.obj : error LNK2019: unresolved external symbol __imp__waveOutGetDevCapsA@12 referenced in function "public: int __thiscall AudioInfo::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@AudioInfo@@QAEHPAUtagCREATESTRUCTA@@@Z)rnAudioInfo.obj : error LNK2019: unresolved external symbol __imp__midiOutGetNumDevs@0 referenced in function "public: int __thiscall AudioInfo::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@AudioInfo@@QAEHPAUtagCREATESTRUCTA@@@Z)rnAudioInfo.obj : error LNK2019: unresolved external symbol __imp__waveOutGetNumDevs@0 referenced in function "public: int __thiscall AudioInfo::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@AudioInfo@@QAEHPAUtagCREATESTRUCTA@@@Z)rnC:\Documents and Settings\Done\My Documents\Visual Studio 2005\Projects\FFT\Debug\FFT.exe : fatal error LNK1120: 4 unresolved externalsrnBuild log was saved at "file://c:\Documents and Settings\Done\My Documents\Visual Studio 2005\Projects\FFT\FFT\Debug\BuildLog.htm"rnFFT - 5 error(s), 0 warning(s)rn========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========rnrnPS:已包含头文件:mmsystem.h,也尝试过了加载Dlgmgr.lib,就是提示错误,请各位大哥指点一二rn

unresolved external symbol错误

10-06

初学symbian一周,在机器上跑一本书提供的例子,出了一堆错,请明眼人看看怎么解决,是缺少库吗?缺少的是什么库,怎么添加?谢谢了!rnrnDeleting intermediate files and output files for project 'COUNTDOWN - Win32 Uni Debug'.rn--------------------Configuration: COUNTDOWN - Win32 Uni Debug--------------------rnBuilding resources from Countdown_caption.rssrn perl -S epocrc.pl -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA" -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP" -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\INC" -I- -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP" -Irn "\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE" -DLANGUAGE_SC -u "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\Countdown_caption.rss" -o"\Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\Z\SYSTEM\APPS\COUNTDOWN\COUNTDOWN_CAPTION.rSC" -h"\SrnYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN_CAPTION.rs~" -t"\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB"rn echo this is a dummy output file > "\Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\Z\SYSTEM\APPS\COUNTDOWN\COUNTDOWN_CAPTION.rSC.dummy"rn perl -S ecopyfile.pl "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN_CAPTION.rs~" "\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE\COUNTDOWN_CAPTION.RSG"rn del "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN_CAPTION.rs~"rnBuilding resources from Countdown.rssrn perl -S epocrc.pl -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA" -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP" -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\INC" -I- -I "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP" -Irn "\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE" -DLANGUAGE_SC -u "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\Countdown.rss" -o"\Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\Z\SYSTEM\APPS\COUNTDOWN\COUNTDOWN.rSC" -h"\SYMBIAN\7.0S\SERIrnES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN.rs~" -t"\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB"rn echo this is a dummy output file > "\Symbian\7.0s\Series60_v20\EPOC32\RELEASE\WINS\UDEB\Z\SYSTEM\APPS\COUNTDOWN\COUNTDOWN.rSC.dummy"rn perl -S ecopyfile.pl "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN.rs~" "\Symbian\7.0s\Series60_v20\EPOC32\INCLUDE\COUNTDOWN.RSG"rn del "\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\..\DATA\COUNTDOWN.rs~"rnCompiling...rnCountdown.uid.cpprnCountdownapp.cpprnCountdownappui.cpprnCountdowncontainer.cpprnF:\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\Countdowncontainer.cpp(77) : warning C4100: 'aIndex' : unreferenced formal parameterrnF:\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\Countdowncontainer.cpp(223) : warning C4100: 'aListBox' : unreferenced formal parameterrnF:\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\SRC\Countdowncontainer.cpp(324) : warning C4189: 'pos' : local variable is initialized but not referencedrnCountdowndocument.cpprnGenerating Code...rnDoing first-stage link by namern link.exe @F:\DOCUME~1\Admin\LOCALS~1\Temp\nma00156.rn Creating library \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB\COUNTDOWN.lib and object \Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDrnOWN\WINS\UDEB\COUNTDOWN.exprnCOUNTDOWNAPPUI.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCountDownDB::SaveRscL(void)" (?SaveRscL@CCountDownDB@@QAEXXZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCountDownDB::SaveRscL(void)" (?SaveRscL@CCountDownDB@@QAEXXZ)rnCOUNTDOWNAPPUI.obj : error LNK2001: unresolved external symbol "public: __thiscall CCountDownDB::CCountDownDB(void)" (??0CCountDownDB@@QAE@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall CAknGlobalNote::ShowNoteL(class TRequestStatus &,enum TAknGlobalNoteType,class TDesC16 const &)" (?ShowNoteL@CAknGlobalNote@@QAEHAAVTRequestStatus@@W4TAknGlobrnalNoteType@@ABVTDesC16@@@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: static class CAknGlobalNote * __cdecl CAknGlobalNote::NewLC(void)" (?NewLC@CAknGlobalNote@@SAPAV1@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: void __thiscall CColumnListBoxData::SetIconArray(class CArrayPtr *)" (?SetIconArray@CColumnListBoxData@@QAEXPAV?$CArrayPtr@VCGulIcon@@@@@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: class CColumnListBoxData * __thiscall CColumnListBoxItemDrawer::ColumnData(void)const " (?ColumnData@CColumnListBoxItemDrawer@@QBEPAVCColumnListBoxData@@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: class CColumnListBoxItemDrawer * __thiscall CEikColumnListBox::ItemDrawer(void)const " (?ItemDrawer@CEikColumnListBox@@QBEPAVCColumnListBoxItemDrawer@@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: class TPtrC16 __thiscall TParseBase::DriveAndPath(void)const " (?DriveAndPath@TParseBase@@QBE?AVTPtrC16@@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: int __thiscall TParse::Set(class TDesC16 const &,class TDesC16 const *,class TDesC16 const *)" (?Set@TParse@@QAEHABVTDesC16@@PBV2@1@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: __thiscall TParse::TParse(void)" (??0TParse@@QAE@XZ)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: void __thiscall CDesC16Array::AppendL(class TDesC16 const &)" (?AppendL@CDesC16Array@@QAEXABVTDesC16@@@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "int __cdecl GetDays(class TTime &,class TTime &)" (?GetDays@@YAHAAVTTime@@0@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "int __cdecl GetDays(class TTime &,class TInt64)" (?GetDays@@YAHAAVTTime@@VTInt64@@@Z)rnCOUNTDOWNCONTAINER.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCountDownDB::SaveDBL(void)" (?SaveDBL@CCountDownDB@@QAEXXZ)rn\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB\COUNTDOWN.APP : fatal error LNK1120: 14 unresolved externalsrnNMAKE : fatal error U1077: 'link.exe' : return code '0x460'rnStop.rn if exist "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB\COUNTDOWN.exp" del "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB\rnCOUNTDOWN.exp"rnStopped the build by removing the export object,rnif present, because the pre-link stage failedrnLinking...rnLINK : fatal error LNK1104: cannot open file "\Symbian\7.0s\Series60_v20\EPOC32\BUILD\SYMBIAN\7.0S\SERIES60_V20\EPOC32\COUNTDOWN\GROUP\COUNTDOWN\WINS\UDEB\COUNTDOWN.exp"rnError executing link.exe.rnrnCOUNTDOWN.APP - 18 error(s), 3 warning(s)rn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试