Open karliss opened 9 years ago
@karliss thank you for testing. In case you've been able to work around these problems, I'd love to see your changes and try incorporating them. A patch would be even more welcome.
@karliss I'd like to let you know that the va_list bug has been fixed for more than two weeks - I am sorry for not informing you earlier.
Great, that got me a bit further. Some .cs files were generated. And i got a bunch of CS0246 QEvent and QObject. Does CppSharp automatically tries to compile generated files?
Yes, it does. About the problem itself, I am afraid I don't have the time at the moment. @golddranks has been working on the problem of dependencies which causes the majority of compilation errors so you could help him if you want. Alternatively, I can take patches for your other suggestions.
@ddobrev i get this on Linux after compiling Qtsharp on ubuntu
Error parsing 'QtCore' /usr/include/qt5/QtCore/qglobal.h(82,10): fatal: 'algorithm' file not found
and then a null refrence exception at some where in QtSharp.QtSharp.Preprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext lib),
one question i am not very good with regular expressions , can you explain this so i may help https://github.com/ddobrev/QtSharp/blob/master/QtSharp/QtSharp.cs#L30
@shahid-pk could you please look in the debugger and tell me the value of "library"?
@ddobrev its value is libQt5Core.so
@ddobrev after commenting out this line https://github.com/ddobrev/QtSharp/blob/master/QtSharp/QtSharp.cs#L68 i got QtCore parsed, and got cs wrappers , now the c# compiler is complaining, which can be fixed easily, but the thing i am woried about is that QtCore parsing error which is still not fixed
/usr/include/qt5/QtCore/qglobal.h(82,10): fatal: 'algorithm' file not found,
@shahid-pk so the null ref wasn't at the regex line, that's a relief. I couldn't figure out why it would crash there. About the line you've commented out, it crashes because of the missing header. I am working on another issue at the moment, when I'm done, I'll apply an improved way of getting the MinGW headers which should fix your issue.
@shahid-pk I've implemented @karliss 's third suggestion (thanks!) and you should now have no problem with headers.
@ddobrev oh that is great to hear. i am giving it a try.
@ddobrev i get into another trouble which is related to CppSharp, this project is using CppSharp.Parser.CLI while on linux you can not build that assembly, because that will need a c++/cli compiler, correct me if i am wrong. so i tried to use CppSharp.Parser.Csharp instead of CppSharp.Parser.CLI but this project is using things that are not present in that assembly. the compiler complains with this error CppSharp.Parser.ParserOptions is defined in an assembly that is not referenced and four others like it.
@shahid-pk I thought you had compiled C++# on Linux, otherwise you wouldn't have been able to even start the parser. What exact references do you use?
@ddobrev yes i compiled CppSharp on Linux .. but the thing is on Linux i can not compile CppSharp.Parser.CLI because of obvious reasons, their is no C++/Cli compiler on Linux if i am not mistaken. building of CppSharp.Parser.CLI is excluded from the Linux build. But before i merged the latest commits i was able to compile the Qtsharp project by using CppSharp.Parser.Charp instead of CppSharp.Parser.CLI, all other assemblies are the same , and of course the native CppSharp.CppParser.dll is also different on Linux it is libCppSharp.CppParser.so
Sorry for that not being clear. CppSharp.Parser.Charp is indeed used on non-Windows systems. I'll look into switching to it for Windows as well as to avoid confusion.
@ddobrev switching at this time is the correct option in my opinion , because you are using only a few things from CLI that is not in CSharp.So the switch will require less effort.
Hi ddobrev, any news for linux support ?
@armando-basile I am afraid not. I have two more bugs to fix to make a more stable Windows alpha which I should be able to finish by the middle of November. However, I would welcome any assistance for the Linux port so let me know if there's anything that gets in your way.
Here are some observations on trying to run QtSharp on linux