CQuery

2013. 3. 25. 11:30언어/C++


CQuery.cpp


CQuery.h



첨부하고 컴파일 하면 아래와 같은 링크 에러가 발생한다.

CQuery.obj : error LNK2001: unresolved external symbol _SQLSetEnvAttr@16

CQuery.obj : error LNK2001: unresolved external symbol _SQLAllocHandle@12

CQuery.obj : error LNK2001: unresolved external symbol _SQLDisconnect@4

CQuery.obj : error LNK2001: unresolved external symbol _SQLFreeHandle@8

CQuery.obj : error LNK2001: unresolved external symbol _SQLGetDiagRec@32

CQuery.obj : error LNK2001: unresolved external symbol _SQLConnect@28

CQuery.obj : error LNK2001: unresolved external symbol _SQLDriverConnect@32

CQuery.obj : error LNK2001: unresolved external symbol _SQLDescribeCol@36

CQuery.obj : error LNK2001: unresolved external symbol _SQLBindCol@24

CQuery.obj : error LNK2001: unresolved external symbol _SQLNumResultCols@8

CQuery.obj : error LNK2001: unresolved external symbol _SQLRowCount@8

CQuery.obj : error LNK2001: unresolved external symbol _SQLExecDirect@12

CQuery.obj : error LNK2001: unresolved external symbol _SQLFetch@4

CQuery.obj : error LNK2001: unresolved external symbol _SQLFreeStmt@8

CQuery.obj : error LNK2001: unresolved external symbol _SQLCloseCursor@4

CQuery.obj : error LNK2001: unresolved external symbol _SQLGetData@24

CQuery.obj : error LNK2001: unresolved external symbol _SQLPutData@12

CQuery.obj : error LNK2001: unresolved external symbol _SQLParamData@8

CQuery.obj : error LNK2001: unresolved external symbol _SQLBindParameter@40



아래의 코드를 넣어주면 된다.

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


출처 : http://soenlab.com/

출처 : 데브피아 댓글

'언어 > C++' 카테고리의 다른 글

RS232 CreateFile()  (0) 2013.03.19
배포된 DLL 내부함수 보기  (0) 2013.01.08
API HOOK 관련 사이트  (0) 2011.12.09
BHO와 어플리케이션 그리고 공유메모리  (0) 2011.12.05
BHO 관련 자료들  (0) 2011.12.02