3 ms·
Another solution could be translating C++ source to Object Pascal before building. It might not be a full C++ but still an acceptable solution.
by zerr 2y ago
Another solution could be translating C++ source to Object Pascal before building. It might not be a full C++ but still an acceptable solution.
- badsectoracula 2y agoThat'd only allow you to compile C++ with FPC so you could use the LCL libraries from code, but it wouldn't allow you to use the Lazarus IDE's RAD abilities. And TBH i think it'd be faster to generate a C++ bridge between FPC and C++ and then use G++ to compile the C++ code (you can link .o files to FPC programs, it is how i made Linux binaries for Lazarus programs that use the Qt6 backend and link against Qt6 directly instead of going via the qt-to-pascal bindings library that exposes a C interface for Qt: i link the bridge library statically). FPC has the fcl-pas package which can parse Object Pascal code so the bridge generation could be done automatically. If anything all these would be the (relatively) easy part, the hard part would be parsing C++ so that Lazarus can work with the code in there :-P.
- zerr 2y agoThinking... even code-only usage would be useful I guess, for C++ (like you use wxWidgets/GTK/FLTK). Also, you could visually build the UI in Lazarus, then load in C++ code, if such thing is supported in Lazarus.