티스토리 뷰

아래는 leveldb윈도우 포팅인데, C++11에서 제공하는 "variadic templates"기능을 가진 컴파일러에서만 전체 빌드가 가능하다.  물론, 단계 5까지는 이하 버전에서도 가능하다.


On Windows

Prerequisites

  1. Msys
  2. Mingw - I got mine from http://www.nuwen.net

Steps

  1. Get LevelDB from https://github.com/ripple/leveldb
  2. Open msys and navigate to where you have the directory
  3. Add the path to ming binaries to the end of the PATH variable. For exampleset PATH=$PATH:/c/Mingw/bin/
  4. export TARGET_OS=NATIVE_WINDOWS
  5. make
  6. Download leveldb_cross_compiler from https://github.com/jbandela/leveldb_cross_compiler
  7. C:\Users\jrb\Source\Repos\leveldb_cross_compiler>g++ leveldb_cc_dll.cpp -O2 -shared -o leveldb_cc_dll.dll ..\leveldb\libleveldb.a -I ..\leveldb\include -I ..\cr oss_compiler_call -lshlwapi -std=c++11replacing the paths to libleveldb.a and leveldb\include and cross_compiler_call as necessary