构建.jar文件的步骤有SimGrid。
我从这里下载了归档文件。然后我做了如下
cmake -DCMAKE_INSTALL_PREFIX=/home/Documents/simgrid -Denable_maintainer_mode=off -Denable_compile_optimizations=off -Denable_java=on -Denable_model-checking=off
make
make check100% tests passed, 0 tests failed out of 586
ctest100% tests passed, 0 tests failed out of 586
make installSimGrid3.13文件夹中有simgrid.jar。但是,当我编写代码时,我无法从这个.jar文件加载类。我怎么才能修好它?
更新如果我从在此下载就绪simgrid.jar,则会发生错误
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/simgrid-java2166199247712718748/libsimgrid.so: libcgraph.so.6: cannot open shared object file: No such file or directory在这里我必须添加libsimgrid-java.so,libsimgrid.so
安装UPDATED2后,安装graphviz graphviz-dev。新错误发生
Invalid XML (XML input line 2, state 2): Bad declaration <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">.
If your are using a XML v3 file (check the version attribute in <platform>), please update it with tools/simgrid_update_xml.pl
[0.000000] /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/surf/xml/surfxml_sax_cb.cpp:55: [surf_parse/ERROR] Parse error at (null):2: Parse error in /home/ken/IdeaProjects/Sim2Sim/src/main/java/LHCb/platform.xml
[0.000000] /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/surf/xml/surfxml_sax_cb.cpp:57: [xbt/CRITICAL] Exiting now发布于 2016-04-12 14:06:30
至于第二次更新,您应该读取复制粘贴的错误消息:
If your are using a XML v3 file (check the version attribute in <platform>), please update it with tools/simgrid_update_xml.pl
你能否证实:
version属性在<platform>中是3发布于 2016-04-12 14:02:56
我刚刚在第二个搜索框中检查了Debian包搜索页面。我查找了/usr/lib/libcgraph.so.6,它说这个库在包libcgraph6中。所以你必须要apt-get install libcgraph6才能得到它。
https://stackoverflow.com/questions/36574526
复制相似问题