[問題] 找得到include檔卻找不到其內function
大家好,
小弟最近在學習程式,
找到網路上的一些範例,
在vc++ 2008 express內建立專案,
並且設定inculde file的路徑,
將範例上的code複製到vc 2008 express內,
這樣做的結果是。
比方說有個在windows.h內的function xxx
vc++不會抱怨說找不到windows.h檔
但是卻會抱怨error找不到function xxx
什麼情況下會發生這樣的情形呢?
請指點一下,
謝謝。
建立專案的方式如下
1. 建立空專案,在project->properties->C/C++->preprocessor設定_WIN32;_CONSOLE
2. properties->C/C++->General設定Platform SDK include的路徑
3. properties->link->general設定platfrom SDK lib的路徑
4. 加入cpp檔 貼上code
錯誤訊息如下,
1>------ Build started: Project: usblist, Configuration: Debug Win32 ------
1>Compiling...
1>usblist.cpp
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(15) :
error C2065: 'PRAWINPUTDEVICELIST' : undeclared identifier
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(15) :
error C2146: syntax error : missing ';' before identifier
'pRawInputDeviceList'
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(15) :
error C2065: 'pRawInputDeviceList' : undeclared identifier
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(16) :
error C2065: 'RAWINPUTDEVICE' : undeclared identifier
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(16) :
error C2146: syntax error : missing ';' before identifier 'Rid'
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(16) :
error C2065: 'Rid' : undeclared identifier
1>d:\data\dirty_pc\work_data\work\project\usblist\usblist\usblist.cpp(18) :
error C2065: 'pRawInputDeviceList' : undeclared identifier
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.136.217.251
推
10/14 02:26, , 1F
10/14 02:26, 1F
→
10/14 02:26, , 2F
10/14 02:26, 2F
→
10/14 02:28, , 3F
10/14 02:28, 3F
推
10/14 02:30, , 4F
10/14 02:30, 4F
→
10/14 02:31, , 5F
10/14 02:31, 5F
※ 編輯: MotherCon 來自: 114.136.217.251 (10/14 02:36)
推
10/14 02:40, , 6F
10/14 02:40, 6F
→
10/14 02:41, , 7F
10/14 02:41, 7F
→
10/14 09:19, , 8F
10/14 09:19, 8F
→
10/14 09:20, , 9F
10/14 09:20, 9F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章