2011-09-15 39 views
0

我试图用C++函数GetCursorPos,但Visual C++ 2010给我的错误:C++ GetCursorPos问题

1>click program.obj : error LNK2028: Nicht aufgelöstes Token (0A00001E) ""extern "C" int __stdcall GetCursorPos(struct tagPOINT *)" ([email protected]@[email protected]@@Z)", auf das in Funktion ""int __cdecl main(void)" ([email protected]@$$HYAHXZ)" verwiesen wird. 
1>click program.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""extern "C" int __stdcall GetCursorPos(struct tagPOINT *)" ([email protected]@[email protected]@@Z)" in Funktion ""int __cdecl main(void)" ([email protected]@$$HYAHXZ)". 
1>c:\users\maxwin\documents\visual studio 2010\Projects\click program\Debug\click program.exe : fatal error LNK1120: 2 nicht aufgelöste externe Verweise. 

谷歌告诉我这样做:

Rightlick on the project in the solution explorer. 
Select Linker 
Select Input 
Add User32.lib into the field "Additional Libraries" 

但我未能遵守它,解决方案资源管理器在哪里?这是来自不同的编译器的MB?我有visual C++ 2010 express。

+2

我看不懂德语,你能提供翻译吗? :) –

回答

1

解决方案资源管理器是显示解决方案中的文件的树。它通常在代码编辑器窗口的右侧。在VS2008(开放德尔福棱镜样品溶液),它看起来像这样:

Solution Explorer Window iage

在此图像中,您将在ConsoleApplication1右键单击并选择属性,然后按照指示以上。