test_simdag.c:(.text+0x1e): undefined reference to `SD_init'
test_simdag.c:(.text+0x45): undefined reference to `SD_task_creat_comp_seq'
test_simdag.c:(.text+0x72): undefined reference to `SD_task_creat_comp_seq'
test_simdag.c:(.text+0x9f): undefined reference to `SD_task_creat_comp_seq'
test_simdag.c:(.text+0xcc): undefined reference to `SD_task_create_com_e2e'
test_simdag.c:(.text+0xef): undefined reference to `SD_task_dependency_add'
答案 0 :(得分:0)
我用“apt-get install simgrid”安装了simgrid。 test-simgrid.c的内容是:
#include "simdag/simdag.h"
int main(int argc, char **argv)
{
SD_task_t c1, c2, c3, t1;
SD_init(&argc, argv);
c1 = SD_task_create_comp_seq("c1", NULL, 1E9);
c2 = SD_task_create_comp_seq("c2", NULL, 5E9);
c3 = SD_task_create_comp_seq("c3", NULL, 2E9);
t1 = SD_task_create_comm_e2e("t1", NULL, 5e8);
SD_task_dependency_add("c1-t1", NULL, c1, t1);
SD_task_dependency_add("t1-c3", NULL, t1, c3);
SD_task_dependency_add("c2-c3", NULL, c2, c3);
SD_exit();
return 0;
}