Friday, April 30, 2010

Use CLucene

  1. create a new project with 'Win32 Console Application'
  2. add 'new project...' with CLucene
  3. in property of Solution, change 'Project Dependencies', your project depends on CLucene
  4. edit stdafx.h, stdafx.c with the same content of Demo
  5. in property pages of your project:
  • C/C++ General: ../../src;../../src/yourProj
  • Preprocessor (maybe)
  • Code Generation: Runtime library - /MTd
  • Precompiled Headers: Not using (maybe)
  • Liner General: Enable Incremental Linking - Yes (/Incremental) (maybe)
  • input: Additional Dependencies - ../../build/lib/clucene-coreUDMT.lib
If you got the error "defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library", you may try change the Runtime library with '?MTd'
If you got the link error "IndexFiles.obj : error LNK2019: unresolved external symbol "public: char * __thiscall lucene:: ....", something was wrong with the very first step. Try to New a  'Win32 Console Application'.

No comments:

Post a Comment