| 1) vc網(wǎng)絡(luò )編程中遇到一個(gè)編譯問(wèn)題,原來(lái)是少了WSOCK32.LIB。 在 project-->settings-->Link-->Object/Library modules 中加入庫WSOCK32.LIB即可。 在VC中進(jìn)行WINSOCK的API編程開(kāi)發(fā)的時(shí)候,需要在項目中使用下面三個(gè)文件,否則會(huì )出現編譯錯誤。 1.WINSOCK.H: 這是WINSOCK API的頭文件,需要包含在項目中。 2.WSOCK32.LIB: WINSOCK API連接庫文件。在使用中,一定要把它作為項目的非缺省的連接庫包含到項目文件中去。 3.WINSOCK.DLL: WINSOCK的動(dòng)態(tài)連接庫,位于WINDOWS的安裝目錄下。 --------------------Configuration: Example1 - Win32 Debug-------------------- Linking... error LNK2001: unresolved external symbol _connect@12 error LNK2001: unresolved external symbol _htons@4 error LNK2001: unresolved external symbol _inet_addr@4 error LNK2001: unresolved external symbol _socket@12 error LNK2001: unresolved external symbol _closesocket@4 error LNK2001: unresolved external symbol _send@16 error LNK2001: unresolved external symbol _recv@16 error LNK2001: unresolved external symbol _WSAAsyncSelect@16 error LNK2001: unresolved external symbol _accept@12 error LNK2001: unresolved external symbol _listen@8 error LNK2001: unresolved external symbol _bind@12 (2) vc數據庫SQL編程中遇到一個(gè)問(wèn)題,原來(lái)是少了odbc32.lib。 在 project-->settings-->Link-->Object/Library modules 中加入庫odbc32.lib 即可。 mfc程序調用了odbc api,連接時(shí)出錯: error LNK2001: unresolved external symbol _SQLConnect@28 error LNK2001: unresolved external symbol _SQLFetch@4 error LNK2001: unresolved external symbol _SQLBindCol@24 error LNK2001: unresolved external symbol _SQLFreeHandle@8 error LNK2001: unresolved external symbol _SQLExecDirect@12 error LNK2001: unresolved external symbol _SQLAllocHandle@12 error LNK2001: unresolved external symbol _SQLSetEnvAttr@16 error LNK2001: unresolved external symbol _SQLDisconnect@4 (3) vc OpenCV圖像處理編程中遇到一個(gè)問(wèn)題,原來(lái)是少了cv.lib cvaux.lib cxcore.lib highgui.lib。 在 project-->settings-->Link-->Object/Library modules 中加入庫cv.lib cvaux.lib cxcore.lib highgui.lib 即可。 error LNK2001: unresolved external symbol _cvReleaseImage error LNK2001: unresolved external symbol _cvWaitKey error LNK2001: unresolved external symbol _cvDrawContours error LNK2001: unresolved external symbol _cvReleaseMemStorage error LNK2001: unresolved external symbol _cvDestroyWindow error LNK2001: unresolved external symbol _cvFindContours error LNK2001: unresolved external symbol _cvCvtColor error LNK2001: unresolved external symbol _cvCreateImage error LNK2001: unresolved external symbol _cvGetSize error LNK2001: unresolved external symbol _cvShowImage error LNK2001: unresolved external symbol _cvLoadImage error LNK2001: unresolved external symbol _cvNamedWindow error LNK2001: unresolved external symbol _cvCreateMemStorage (4) vc OpenGL三維編程中遇到一個(gè)問(wèn)題,原來(lái)是少了OpenGL32.lib GLu32.lib GLaux.lib。 在 project-->settings-->Link-->Object/Library modules 中加入庫OpenGL32.lib GLu32.lib GLaux.lib 即可。 error LNK2001: unresolved external symbol _gluPerspective@32 error LNK2001: unresolved external symbol _gluLookAt@72 error LNK2001: unresolved external symbol __imp__glLoadIdentity@0 error LNK2001: unresolved external symbol __imp__glMatrixMode@4 error LNK2001: unresolved external symbol __imp__glViewport@16 error LNK2001: unresolved external symbol __imp__glHint@8 error LNK2001: unresolved external symbol __imp__glDepthFunc@4 error LNK2001: unresolved external symbol __imp__glEnable@4 error LNK2001: unresolved external symbol __imp__glClearDepth@8 error LNK2001: unresolved external symbol __imp__glClearColor@16 error LNK2001: unresolved external symbol __imp__glShadeModel@4 error LNK2001: unresolved external symbol __imp__glEnd@0 error LNK2001: unresolved external symbol __imp__glVertex3f@12 error LNK2001: unresolved external symbol __imp__glBegin@4 error LNK2001: unresolved external symbol __imp__glTranslatef@12 error LNK2001: unresolved external symbol __imp__glClear@4 error LNK2001: unresolved external symbol __imp__wglDeleteContext@4 error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8 error LNK2001: unresolved external symbol __imp__wglCreateContext@4 (5) vc VFW視頻采集編程中遇到一個(gè)問(wèn)題,原來(lái)是少了VFW32.Lib 在 project-->settings-->Link-->Object/Library modules 中加入庫VFW32.Lib 即可。 error LNK2001: unresolved external symbol _capCreateCaptureWindowA@32 |
聯(lián)系客服