I want to use the AML.Engine.dll (https://github.com/AutomationML/AMLEngine2.1) in a C++ project. I have gotten it to work with the Microsoft C++ Compiler, but also need it to work with GCC but couldn't do so yet. Are there any compiler settings necessary to do so? Or is it just not possible with GCC?
The code below shows a simple demo project that I tried to get to work.
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
#using <AML.Engine.dll>
#using <System.dll>
#using <System.Xml.dll>
#using <System.Xml.Linq.dll>
using namespace Aml::Engine::CAEX;
int main()
{
// create a new empty document
auto caexDocument = CAEXDocument::LoadFromFile("BSM_Project_210219_V3.1.aml");
CAEXDocument^ doc = CAEXDocument::New_CAEXDocument();
for each(auto instanceHierachy in caexDocument->CAEXFile->InstanceHierarchy){
for each(auto element in instanceHierachy->InternalElement){
System::Console::WriteLine( element->Name) ;
System::Console::WriteLine( "----------------------------------------------------------") ;
for each(auto ielement in element->InternalElement){
System::Console::WriteLine( ielement->Name) ;
}
}
}
}