Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling the tutorial #12

Open
DiBeck opened this issue Apr 22, 2015 · 2 comments
Open

compiling the tutorial #12

DiBeck opened this issue Apr 22, 2015 · 2 comments

Comments

@DiBeck
Copy link

DiBeck commented Apr 22, 2015

Hello again,

I hope I am annoying you not to much, with all the questions. I tried to run one of the tutorial skips by using

make tutorial_sim_iterated

the first error I received was that he could not include "../sim_main.h". Therefore I changed the hello_world_sim_iterated.cpp line 2

#include <sim_main.h>

and include the following paths into ~/.profile

export PATH="/usr/local/include/sim:$PATH"
export PATH="/usr/local/libc:$PATH"
export PATH="/usr/local/lib/libsim:$PATH"

Now I run into the following:

Undefined symbols for architecture x86_64:
  "toExprString(char const*)", referenced from:
      bool Sim::get<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, char [6]>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const (&) [6], SimSignal const&) in ccBhzTjU.o
  "Endl(SimIO&)", referenced from:
      SimControl<Kernel>::simulate(int, char**) in ccBhzTjU.o
  "ExprParser::parse_file(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)", referenced from:
      SimControl<Kernel>::simulate(int, char**) in ccBhzTjU.o

..... two more pages of complains

     std::basic_string<char, std::char_traits<char>, std::allocator<char> > ExprToValueErrorDescription<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(ExpressionPtr const&) in ccBhzTjU.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [tutorial_sim_iterated] Error 1

Do you know what I am doing wrong? If i remember right, that this is also the problem when i am running the te_causality_master from olavolav. Did i forget to add some paths?

Bye the way the ./test inputworks like a charm

Thanks again for all your help.

Dirk

@DiBeck DiBeck changed the title tu compiling the tutorial Apr 22, 2015
@orlandi
Copy link
Contributor

orlandi commented Apr 22, 2015

Hi,
Ask as much as you want, it's the only way to fix these isssues!
I see where the issue is, the OBJBASE variable is undefined. Lines 103 and 104 from the Makefile should read:

tutorial_sim_iterated: $(OBJS) tutorial/hello_world_sim_iterated.cpp
$(CC) $(CFLAGS) tutorial/hello_world_sim_iterated.cpp $(OBJS) -o tutorial_sim_iterated $(LDFLAGS)

And the include from tutorial/hello_world_sim_iterated.cpp should read: #include "../include/sim_main.h"

BUT, since you have installed simkernel as a library, you have another option, you can keep your include as #include <sim_main.h> and instead change lines 103 and 104 of the Makefile to:

tutorial_sim_iterated: $(OBJS) tutorial/hello_world_sim_iterated.cpp
$(CC) $(CFLAGS) tutorial/hello_world_sim_iterated.cpp $(OBJS) -o tutorial_sim_iterated $(LDFLAGS) -lsim

After that you should be able to run the tutorial with ./tutorial_sim_iterated tutorial/control.txt

If you have issues with te-causality please open an issue there. I might also be able to help with that.

@DiBeck
Copy link
Author

DiBeck commented Apr 23, 2015

Perfect! that solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants