News for hackers. Stuff that matters.
Re:Wine 4.0 released by biggestdecision on Tuesday January 22, 2019 @08:10PM (#18974719)
If you write standard compliant C, don't use platform specific headers, and use some kind of cross-platform build system (I can't recommend CMake enough here), it's easy to use C/C++ across platforms. UI/graphics is harder, but cross-platform solutions do exist here (Qt, GTK, WxWidgets, OpenGL).
Re:Wine 4.0 released by xedrac on Tuesday January 22, 2019 @10:44PM (#18975498)
> I can't recommend CMake enough here

I've used CMake for many years. But now that I've discovered Meson, I cry a little every time I have to edit a CMakeLists.txt file.

Re:Wine 4.0 released by biggestdecision on Wednesday January 23, 2019 @02:33AM (#18976421)
The biggest issue with CMake is how many libraries seem to have really low quality CMakeLists.txt's.

CMake is very easy to use, if you do things properly with targets. include_directories and link_libraries should never never ever be used, use target_include_directories and target_link_libraries instead. This way there is no need to mess about with shell script style variables for dependencies. But so many resources online explain to people how to do things the wrong way, and so their libs end up being a pain to build or depend on.

Re:Wine 4.0 released by flukus on Wednesday January 23, 2019 @07:16PM (#18984695)
IME the documentation is great at a command level but does a poor job of explaining how things fit together at a macro level.

I did a large project conversion last year and was well into it before I started getting a feel for how everything fit together with Public/Private.

Re:Wine 4.0 released by lbbe on Wednesday January 23, 2019 @12:00AM (#18975790)
But meson used pkg-config under the hood, which looks very unusual/like alien creation for Windows Devs.
Re:Wine 4.0 released by int_19h on Wednesday January 23, 2019 @01:01AM (#18976030)
These days with stuff like MSYS2 readily available, it's not really as alien as one might think.
Re:Wine 4.0 released by flukus on Wednesday January 23, 2019 @01:23AM (#18976124)
If your using stuff like MSYS2 does cmake/meson have a big advantage over old make/autoconf? I thought cross platform was the biggest selling point for these tools.
Re:Wine 4.0 released by int_19h on Thursday January 24, 2019 @01:26AM (#18986434)
For me, sanity is the main selling point. Make has meaningful space/tab distinction - that's quite enough to disqualify it as hopelessly mad in my book. And then autoconf is just baroque.

CMake only helps a little bit (it's still very old and has way too many warts). But Meson is very pleasant to work with.

Re:Wine 4.0 released by aepiepaey on Wednesday January 23, 2019 @09:24AM (#18978315)
One selling point seems to be speed: https://mesonbuild.com/Performance-comparison.html
Re:Wine 4.0 released by sdinsn on Tuesday January 22, 2019 @08:27PM (#18974833)
> don't use platform specific headers

Which is often unavoidable if you want to do filesystem stuff.

Re:Wine 4.0 released by flukus on Tuesday January 22, 2019 @09:32PM (#18975161)
Qt and Gtk (or just glib) can handle file systems identically across platforms.
Re:Wine 4.0 released by lbbe on Wednesday January 23, 2019 @12:01AM (#18975791)
I prefer using boost, if UI is not required