bureau14 / leveldb

Bureau 14 LevelDB branch with full Windows support. Requires Boost
BSD 3-Clause "New" or "Revised" License
73 stars 50 forks source link

Windows , when use MSVC to compile leveldb.sln error #2

Open cobbwho opened 5 years ago

cobbwho commented 5 years ago

System OS platform: win10 boost: boost1.67 cmake: cmakev3.6.3 VS: VS2015 when I use cmake to configure the project and set boost in the right dir, it's ok as follow:

The CXX compiler identification is MSVC 19.0.23026.0
Check for working CXX compiler: D:/VS2015/VC/bin/cl.exe
Check for working CXX compiler: D:/VS2015/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Configuring done

But when I click generate button to generate it , some Warnings happened:

WARNING: Target "leveldb_bloom_test" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldb_bloom_test" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldb_bloom_test" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldb_bloom_test" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldbutil" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldbutil" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldbutil" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "leveldbutil" requests linking to directory "C:/local/boost_1_67_0/lib64-msvc-14.0".  Targets may link only to libraries.  CMake is dropping the item.
.......................and so on.

It's all warnings ,but when I use vs2015 to compile the leveldb.sln, Some projects cannot be compiled successfully。 Has anyone ever encountered this problem? I'm very grateful if there's any help. ps:"C:/local/boost_1_67_0/lib64-msvc-14.0"is my path to boost's libs.

edouarda commented 5 years ago

It seems to be trying to link a directory instead of the library. You may have specified the directory has a library, instead of specifying a path to libraries.

cobbwho commented 5 years ago

You may have specified the directory has a library, instead of specifying a path to libraries. @edouarda Thank you so much.But But I'm a little confused about the word of "path" and "directory". The directory mentioned in the above warning which called C:/local/boost_1_67_0/lib64-msvc-14.0 is a folder with lib files in it. You mean let me specify the path of the library file, not the path of the folder?

cobbwho commented 5 years ago

It seems to be trying to link a directory instead of the library. You may have specified the directory has a library, instead of specifying a path to libraries. @edouarda Hi, thank you so much. You reminded me of this: Actually, I need put the specific the directory of *.lib file to the right LIBRARY_DIR. Like this: LMDB_LIBRARIES ---->C:/local/lmdb/libraries/liblmdb/builds/Debug/lmdbd.lib right LMDB_LIBRARIES ---->C:/local/lmdb/libraries/liblmdb/builds/Debug false