Error occurs when compile the ToVTK4 source code
Hello everyone,
I want to compile the ToVTK4 source code, but a error without reference about vtk and xml files always occurs. Here is part of the script:
daye@daye-Inspiron-7577:~/DualSPHysics/DualSPHysics_v4.0_Linux_x64/For_Learn/SOURCE/ToVtk4/source_check$ make all
g++ -std=c++11 -c -O3 main.cpp
g++ -std=c++11 -c -O3 Functions.cpp
g++ -std=c++11 -c -O3 JBinaryData.cpp
g++ -std=c++11 -c -O3 JCfgRun.cpp
g++ -std=c++11 -c -O3 JException.cpp
g++ -std=c++11 -c -O3 JObject.cpp
g++ -std=c++11 -c -O3 JPartDataBi4.cpp
g++ -std=c++11 -c -O3 JRangeFilter.cpp
g++ -std=c++11 -c -O3 JSpaceCtes.cpp
g++ -std=c++11 -c -O3 JSpaceEParms.cpp
g++ -std=c++11 -c -O3 JSpaceParts.cpp
g++ -std=c++11 -c -O3 JSpaceProperties.cpp
g++ -std=c++11 main.o Functions.o JBinaryData.o JCfgRun.o JException.o JObject.o JPartDataBi4.o JRangeFilter.o JSpaceCtes.o JSpaceEParms.o JSpaceParts.o JSpaceProperties.o -o tovtk -L ./ -ljxml_64 -ljcreatevtk_64
main.o: In function `RunFiles(JCfgRun const*)':
main.cpp:(.text+0x518): undefined reference to `JXml::LoadFile(std::__cxx11::basic_string, std::allocator > const&)'
main.cpp:(.text+0x1ce2): undefined reference to `JCreateVtk::SaveVtk(std::__cxx11::basic_string, std::allocator >, unsigned int, tfloat3 const*, unsigned int, JCreateVtk::StScalarData const*)'
main.cpp:(.text+0x1dd1): undefined reference to `JCreateVtk::SaveCsv(std::__cxx11::basic_string, std::allocator >, unsigned int, tfloat3 const*, unsigned int, JCreateVtk::StScalarData const*)'
JSpaceCtes.o: In function `JSpaceCtes::ReadXmlElementAuto(JXml*, TiXmlElement*, bool, std::__cxx11::basic_string, std::allocator >, double&, bool&)':
JSpaceCtes.cpp:(.text+0xa32): undefined reference to `JXml::GetFirstElement(TiXmlNode const*, std::__cxx11::basic_string, std::allocator > const&, bool) const'
......
Looking forward for your help!
Daye
I want to compile the ToVTK4 source code, but a error without reference about vtk and xml files always occurs. Here is part of the script:
daye@daye-Inspiron-7577:~/DualSPHysics/DualSPHysics_v4.0_Linux_x64/For_Learn/SOURCE/ToVtk4/source_check$ make all
g++ -std=c++11 -c -O3 main.cpp
g++ -std=c++11 -c -O3 Functions.cpp
g++ -std=c++11 -c -O3 JBinaryData.cpp
g++ -std=c++11 -c -O3 JCfgRun.cpp
g++ -std=c++11 -c -O3 JException.cpp
g++ -std=c++11 -c -O3 JObject.cpp
g++ -std=c++11 -c -O3 JPartDataBi4.cpp
g++ -std=c++11 -c -O3 JRangeFilter.cpp
g++ -std=c++11 -c -O3 JSpaceCtes.cpp
g++ -std=c++11 -c -O3 JSpaceEParms.cpp
g++ -std=c++11 -c -O3 JSpaceParts.cpp
g++ -std=c++11 -c -O3 JSpaceProperties.cpp
g++ -std=c++11 main.o Functions.o JBinaryData.o JCfgRun.o JException.o JObject.o JPartDataBi4.o JRangeFilter.o JSpaceCtes.o JSpaceEParms.o JSpaceParts.o JSpaceProperties.o -o tovtk -L ./ -ljxml_64 -ljcreatevtk_64
main.o: In function `RunFiles(JCfgRun const*)':
main.cpp:(.text+0x518): undefined reference to `JXml::LoadFile(std::__cxx11::basic_string, std::allocator > const&)'
main.cpp:(.text+0x1ce2): undefined reference to `JCreateVtk::SaveVtk(std::__cxx11::basic_string, std::allocator >, unsigned int, tfloat3 const*, unsigned int, JCreateVtk::StScalarData const*)'
main.cpp:(.text+0x1dd1): undefined reference to `JCreateVtk::SaveCsv(std::__cxx11::basic_string, std::allocator >, unsigned int, tfloat3 const*, unsigned int, JCreateVtk::StScalarData const*)'
JSpaceCtes.o: In function `JSpaceCtes::ReadXmlElementAuto(JXml*, TiXmlElement*, bool, std::__cxx11::basic_string, std::allocator >, double&, bool&)':
JSpaceCtes.cpp:(.text+0xa32): undefined reference to `JXml::GetFirstElement(TiXmlNode const*, std::__cxx11::basic_string, std::allocator > const&, bool) const'
......
Looking forward for your help!
Daye
Debug Trace
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":"Hel...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":"Hel...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 3) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1547, 'x', 'p1') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('4750') #14 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #15 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #16 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"em...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"em...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 4) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1547, 'x', 'p1') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('4750') #14 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #15 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #16 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"em...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"em...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 5) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1547, 'x', 'p1') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('4750') #14 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #15 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #16 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":"Hel...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":"Hel...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 6) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1547, 'x', 'p1') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('4750') #14 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #15 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #16 {main} |
Comments
in order to use recent GCC versions, you should edit the Makefile and change the variable
USE_GCC5=NO
toUSE_GCC5=YES
, then do amake clean
andmake
.You can also use cmake: Best regards,
Orlando.
Hello, I have an error in compiling TOVTK5 source code under Windows system. The error is that the corresponding JVTK library is missing. How should I solve it?
Hello,
Make sure you are using the Visual Studio 2015 compiler (v140) and compiling the code in "Release" mode. You can check the version of the compiler in the "Platform toolset" field in the project properties.
hello
I do use the Visual Studio 2015 Compiler (V140)
Hello,
I tried with the latest version (DualSPHysics_v5.0.4) available on the website https://dual.sphysics.org/downloads/ and it works for me.
Please, share the output of the error if the issue persists using the latest version.