Hacker News new | past | comments | ask | show | jobs | submit login

I have seen comments that suggest you can write cross-platform applications (or at least shared business logic) in c++.

Is that the case? If so, how would you recommend someone go about learning c++?




As in: recompile and works? For sure, see for example a lot of the HEP/NP software which runs typically on Linux, BSDs (incl. MacOS) and I think even Windows.

As in: have the same binary? You could probably use the same object files, but shared libraries and executables probably won't work (without trickery), just because the file format is different.


I read Stroustrup's "tour of C++" then looked specifically for blogs that talked about C++ 17. And wrote a lot of code with all warnings enabled.

Yes you can write cross platform applications though perhaps only the engine, not UI.


Qt is great for cross platform UI, for Mac/Win/Linux at least


Last time I checked QT depended on a signal/slot mechanism that was not C++ compatible. There was a code generator.

Has this changed?


If you use CMake you don't see that generator. It automagically works.


No. But there are alternatives to moc like: https://github.com/woboq/verdigris .


Thank you. Very interesting work.


> Last time I checked QT depended on a signal/slot mechanism that was not C++ compatible.

what do you mean by "not C++ compatible" ? Qt is 100% C++ code. The few macros you see (signals:, slots:, emit) are #defined to nothing or public: / private: in a Qt header




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: