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 on Ubuntu 22.04 fails #206

Open
larry104 opened this issue May 9, 2023 · 6 comments
Open

Compiling on Ubuntu 22.04 fails #206

larry104 opened this issue May 9, 2023 · 6 comments

Comments

@larry104
Copy link

larry104 commented May 9, 2023

When trying to compile on ubuntu 22.04 I get the following error:
` 59%] Linking CXX executable bin/uscxml-transform

/usr/bin/ld: lib/libuscxml_transform.so.2.0.3: undefined reference to `uscxml::PromelaParser::~PromelaParser()'

/usr/bin/ld: lib/libuscxml_transform.so.2.0.3: undefined reference to `uscxml::PromelaParserNode::dump(unsigned long)'

/usr/bin/ld: lib/libuscxml_transform.so.2.0.3: undefined reference to `uscxml::PromelaParser::PromelaParser(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'

collect2: error: ld returned 1 exit status

make[2]: *** [CMakeFiles/uscxml-transform.dir/build.make:126: bin/uscxml-transform] Error 1

make[1]: *** [CMakeFiles/Makefile2:367: CMakeFiles/uscxml-transform.dir/all] Error 2

make: *** [Makefile:166: all] Error 2`

Any idea how to solve that?

@alexzhornyak
Copy link
Contributor

  1. You are trying to compile uscxml-transform application. It transfroms scxml state chart into C code. I am not sure that you need it. But if you need, you should enable Promela in Cmake and convince that Promela is installed on your system

image

  1. I think that you need only SCXML library functions, in this case it will be enough to build only xerces, libevent, uscxml and uscxml-browser

image

@larry104
Copy link
Author

larry104 commented May 9, 2023

yes, you are right if I just compile parts of it it compiles without error. Let me try to run some example if I get it to work.
Thanks again for your help!

@larry104
Copy link
Author

When just building the targets uscxml and uscxml-browser I can't seem to find anywhere a package file so that qt6.x cmake knows with find_package(USCXML .. ) how to link and include the headers. Do I miss something here? At least I was able to manually compile and link a simple example though.

@larry104
Copy link
Author

So, I finally got it to work that I can compile and run a state machine with an ecmascript datamodel. Can anyone point me to a simple example how to send and receive events?

@alexzhornyak
Copy link
Contributor

You can use as origin this example

1. Here you can see how to subscribe to different state machine events

image

image

2. Here is an example how to pass event to state machine

image

@larry104
Copy link
Author

Thanks! That helps a lot.

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