Hi, it has been bothering me for several days. Could anyone help me? Any help is much appreciated! I'm a fresher, so please bear with me.
my operation system is windows 10 version 1703, OS Build:15063.296:
Here is my steps:
src/
lib/
lib/core
lib/io
py/
doc/
tests/
tools/
step2: Build a visual studio 2015 c++ console project, which only have one source code file named main.cpp . And then set Property>>C/C++>>General>>Additional Include Dir: D:\partio\partio-master\src\lib
Step3: when rebuild solution, it always have 4 errors:
1>------ Rebuild All started: Project: partio, Configuration: Release x64 ------
1> main.cpp
1>main.cpp(18): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>main.cpp(19): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>main.cpp(20): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>main.cpp(21): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
1>main.cpp(23): warning C4244: '=': conversion from 'Partio::ParticleIndex' to 'int', possible loss of data
1>main.obj : error LNK2001: unresolved external symbol "class Partio::ParticlesDataMutable * __cdecl Partio::create(void)" (?create@Partio@@YAPEAVParticlesDataMutable@1@XZ)
1>main.obj : error LNK2001: unresolved external symbol "class Partio::ParticlesDataMutable * __cdecl Partio::read(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?read@Partio@@YAPEAVParticlesDataMutable@1@PEBD_NAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "void __cdecl Partio::write(char const *,class Partio::ParticlesData const &,bool,bool,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?write@Partio@@YAXPEBDAEBVParticlesData@1@_N_NAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>E:\Visual Studio\Projects_15\partio\x64\Release\partio.exe : fatal error LNK1120: 3 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Maybe the way I include the Partio is wrong at all, could anyone tell me why? Thanks so much!
CMakeLists.txt exists in the folder, so I tried to Compile the code by Cmake, but it doesn't work too.
This time I uncompressed the sourse code on the desktop.
My Cmake version is v3.8.1
src dir: C:/Users/Dylan/Desktop/partio-master
binary dir: C:/Users/Dylan/Desktop/partio-master/build
generator: visual studio 14 2015 Win64
the error is:
CMake Error at D:/Program Files/CMake/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
Call Stack (most recent call first):
D:/Program Files/CMake/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
D:/Program Files/CMake/share/cmake-3.8/Modules/FindGLUT.cmake:116 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:89 (find_package)
Thanks a lot, my English is poor, hope you can understand.