the error LNK2001 when build a MFC application about openGl

October 18, 2013 at 09:55:16
Specs: Windows 7
I created a MFC application that display square using openGL.And I linked the openGl.lib,glu32.lib and so on. Meanwhile I configurated the related files about OPenGl in visual studio 2010. The deatail error at follows:


1>praticeView.obj : error LNK2001: unresolved external symbol "public: void __thiscall CpraticeView::CPracticeView(void)" (?CPracticeView@CpraticeView@@QAEXXZ)
1>D:\My Documents\Visual Studio 2010\Projects\pratice\Debug\pratice.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.


See More: the error LNK2001 when build a MFC application about openGl

Report •

#1
October 18, 2013 at 10:40:20
It's saying it can't find the constructor for your CpraticeView. Without code, there's not a whole lot I can offer.

How To Ask Questions The Smart Way


Report •

#2
October 19, 2013 at 19:13:28
Thank you! And when i write the codes again in a new MFC projec, the error is disappear. But the Untitled result is empty without the picture i want.
The output debug are:practice.exe':
Loaded 'D:\My Documents\Visual Studio 2010\Projects\practice\Debug\practice.exe', Symbols loaded.
'practice.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\opengl32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\glu32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\ddraw.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\dciman32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\setupapi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\cfgmgr32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\devobj.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\msimg32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\comdlg32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\winspool.drv', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\oledlg.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18120_none_72d2e82386681b36\GdiPlus.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\oleacc.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'E:\360\360Safe\safemon\safemon.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\psapi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\wininet.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\normaliz.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\iertutil.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\urlmon.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\ws2_32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\nsi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\netapi32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\netutils.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\srvcli.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\wkscli.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\atiglpxx.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\atioglxx.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\atigktxx.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\aticfx32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\atiadlxx.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\userenv.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\profapi.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\wtsapi32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\wintrust.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\crypt32.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\msasn1.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\cryptsp.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\rsaenh.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\System32\RpcRtRemote.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Program Files\Lenovo\Energy Management\BatteryTestDLL.dll', Cannot find or open the PDB file
'practice.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc\msvcr80.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x1590) has exited with code 0 (0x0).

Report •
Related Solutions


Ask Question