-
Notifications
You must be signed in to change notification settings - Fork 16
Trying to get the library running with Visual Studio 2019 #20
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
Comments
Hi Andre, I am not sure if the code base currently supports Visual Studio, but at least we have fixed the EPackage and EFactory initialization problems in our fork: https://github.com/inchron/emf4cpp We have also replaced the std::intrusive_ptr by std::shared_ptr for containment and std::weak_ptr for non-containment relations. However, this is a major incompatibility for client code. EOpposite relations are fully supported as well: Calling a setter uses the _inverseXX methods to modify the remote end, and basicsetXX to modify the local end. Furthermore, in our projects we also use multiple ecore files, where classes in one file inherit from classes in the other file. Unfortunately with emf4cpp (or C++?) the ecore files can only form a directed acyclic tree. But the libraries for each ecore file can be created and compiled in separate steps. Please give our fork a try! Regards, |
Hi Matthias, thanks for your quick response, I'll definitely give it a try. I was fighting already with the "intrusive_ptr" under VS2019. So I would be happy to leave that out. PS) I found your version supports the ExtendedMetadata, great :-) |
Many thanks to got to (Matthias Doerfel mdoerfel), I tried to fix the use of intrusive_ptr in this version, however it was leading to strange pointer errors (maybe because boost plus some C++ syntax, which is new for me :-)... My last C++ is 15 years old. Looks like there have been a lot of changes. Finally: this version is not compilable with Visual Studio at the moment. Which is only important for VS2019, since the linker is a bit different here. |
Uh oh!
There was an error while loading. Please reload this page.
Hi there,

I was successfully compiling the library with VS2019.
But I'm getting runtime problems during the initialization of EcorePackage and EcoreFactory.
(Please note the change in line 179, which was Object_ptr ... casting between intrusive pointers can be problematic for derived classes right?
I also noticed that the generated classes do not contain any code for _inverseAdd and _inverseRemove.
Is there any known problem with this 'reverse setup' which Ecore is using. I know from the Java implementation
these two way references between two objects.
This is the function in my Ecore beeing generated:

PS) I have already fixed some missing code for handling more complex ecores (with inheritance over multiple ecores).
however I would wait for a running version before I'm sure this is the fix...
The text was updated successfully, but these errors were encountered: