Link Error
0xJMR opened this issue · comments
@tbfleming with my latest experiments with your tool I discovered an issue that boggled my mind (a picture has been attached). Somehow, the executed WebAssembly throws a Link Error even though I am pretty sure that all the necessary files have been added to the ZIP archive which is loaded at the beginning of the process. I bet it is something minor that we are currently overlooking but I hope that you can help us with our issue. The code snippet to be compiled has also been attached.
// Download a file using https. Only works with sites which support CORS.
// cib:{"fetch":"https://raw.githubusercontent.com/EmbeddedMontiArc/website/master/test2.zip","system_includes":["antlr4","common","monticore", "."], "unzip_compiler":true}
#include <emscripten.h>
#include <stdio.h>
#include <string>
#include <memory>
#include "Grammar_WithConceptsAntlrLexer.h"
#include "Grammar_WithConceptsAntlrParser.h"
#include "antlr4-runtime.h"
using namespace std;
using antlr4::tree::ParseTreeWalker;
using antlr4::ANTLRInputStream;
using antlr4::CommonTokenStream;
using antlrcpp::ws2s;
int main() {
wstring wstr(L"");
string input = ws2s(wstr);
ANTLRInputStream stream(input);
Grammar_WithConceptsAntlrLexer lexer(&stream);
CommonTokenStream tokens(&lexer);
Grammar_WithConceptsAntlrParser parser(&tokens);
parser.mCGrammar();
}
Right now, cib only supports header-only libraries. It ignores the .cpp files in the .zip.
I see. I must have overlooked that in the README. Thank you for your quick response. Since I am unfamiliar with the concepts of cib, is it theoretically possible to extend the support for .cpp files and are there any plans on including this at a later date? If yes then I would leave this issue open and mark it as feature request, otherwise you can close this issue. Nonetheless, I thank you again for your support.