C++ Cross platform file explorer implementation challenges

I would like to implement a cross platform file explorer for both Windows and Linux. Lately, I have been learning to use CMake and writing CMakeList files, so I am thinking of doing some productive work.

My preferred programming language is C++. Using CMake to build for Linux using g++ and on Windows using MS Visual Studio.

Features I would like to implement: - Basic file access: read/write/delete - Cut/Copy/Paste files - Display file information like date created, modified, size, location, etc.

The features are fairly basic right now, but I could add some cool stuff for as I get hang of things.

Question: How to address the challenges associated with file handling on multiple platforms? For example on Windows I can use "GetFileAttributesEx" to get file attributes but this comes from windows.h which is not good for a cross-platform application (doesn't work on Linux). Is there any free cross platform library which would help me develop this application? Can I do this with QT? or with wxWidgets? Please suggest best approaches to take.

The idea is to learn how to build and maintain cross platform programs. I would like to practice the philosophy of "Code once but build for multiple platforms". As this is just a hobby project I am open to all suggestions.


The preferred option would be to use C++17 because thy have integrated the boost::filesystem. I think C++17 is maturing still though so it may not be an option. In general boost is a good choice but the way they programmed it is very slow for both performance and compile time. Qt has a licensing problem with the GNU license that makes in not the preferred choice. GNU has the "Copy-Left" license that forces you to share your changes or pay a licensing fee. BSD-style licenses like Apache, BSD, and MIT are the best, though GNU can be used to pay for developers so you get your money's worth for your licensing fee. JUCE is another stellar GNU-licensed C++ Toolkit worth checking out. You can skirt the GNU license by statically linking to the library.

As a startup founder it is 100% not acceptable for me to pay ANY licensing fee so I have my own SDK called Kabuki Toolkit that is prime for contributing too. At the moment it's broken due to I'm wrapping up a completely restructuring of the Network core but it's got what you need, it just needs some elbow grease.

You've got to make the choice Widget Toolkits upfront. Most developers prefer native widget toolkits for mobile apps but if you want a video-game style interface the native widgets won't work you'll need to use something like MyGUI. The cross-platform widget toolkits are easy to use but they are hard to tweak the fine details to get a specific OS Look-and-Feel.

链接地址: http://www.djcxy.com/p/54606.html

上一篇: 我如何在Xcode 4.1中调试OpenCL内核?

下一篇: C ++跨平台文件浏览器实施挑战