2

나는 정적 내가 hunspell을 다운로드 hunspell-1.3.1\src\win_api 폴더에 갔다 2010 년문제는 2010

비주얼 스튜디오 내 C++ 프로젝트에 라이브러리를 hunspell 링크 할 수 없습니다. Visual Studio 2010에서 libhunspell.vcproj 파일을 열고 프로젝트를 변환했습니다. 내가 Realease 구성에 솔루션을 구축하고 hunspell-1.3.1\src\win_api\Release\libhunspell 폴더에 "libhunspel.lib"파일을 생성했습니다. 내가 속성 페이지/구성 속성/VC++ 디렉토리에 libhunspel.lib 파일이 폴더를 추가

  • /라이브러리 디렉토리

  • I : hunpell를 사용하여 내 간단한 C++ 콘솔 프로그램에서

    "hunspell-1.3.1 \ src \"폴더를 에 추가 속성 페이지/구성 등록 정보/VC++ 디렉토리/디렉토리 포함

  • 및 "libhunspell.lib"~ 속성 페이지/링커/입력/추가 종속성.

하지만 여전히 나에게 확인되지 않은 외부 기호 오류가 있습니다 : 나는 생각이없는

Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall Hunspell::spell(char const *,int *,char * *)" ([email protected]@@[email protected]) referenced in function _main C:\Users\Me\Documents\Visual Studio 2010\Projects\hunspell_learning\hunspell_learning\main.obj hunspell_learning 
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hunspell::Hunspell(char const *,char const *,char const *)" ([email protected]@[email protected]@Z) referenced in function _main C:\Users\Me\Documents\Visual Studio 2010\Projects\hunspell_learning\hunspell_learning\main.obj hunspell_learning 
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hunspell::~Hunspell(void)" ([email protected]@[email protected]) referenced in function _main C:\Users\Me\Documents\Visual Studio 2010\Projects\hunspell_learning\hunspell_learning\main.obj hunspell_learning 
Error 4 error LNK1120: 3 unresolved externals C:\Users\Me\Documents\Visual Studio 2010\Projects\hunspell_learning\Debug\hunspell_learning.exe 1 1 hunspell_learning 

무엇이 잘못 될 수 있습니다. 또한 동적 라이브러리로 시도합니다. Release_dll 구성의 Hunspell 솔루션을 디렉토리에 포함 시키십시오.을 내 응용 프로그램에 넣고 hunspell-1.3.1\src\win_api\Release_dll\libhunspell으로 컴파일합니다. libhunspell.dll 만 복사하면됩니다. 여기서 실행 파일은 dll이로드 될 것입니다.

답변

1

"#define HUNSPELL_STATIC"을 stdafx.h 어딘가에 넣어야합니다.