Cross-platform C ++ command-line utility

I need to develop a Windows / Linux command line utility. The utility will interact with middleware that has a standard API on both platforms. I already did cross-platform development before on FreeBSD / Linux, which was much simpler - and I had people in the group with whom I could talk.

At the moment, there is no one in my group who has been developing Windows / Linux. I’m looking for tips on how to best configure it. I am also new to C ++, basically I developed C # /. NET GUI applications and Linux level driver. Kind of a weird mixture.

I thought it would be better to define my own data types and not use either Linux or certain Windows types - save the OS code in separate folders and enable it conditionally. This is what we have done for Linux / BSD. So it was a good start.

One of the developers here is a big Boost fan ... one more thought: TCLAPthe command line analyzer library was easier to use ... Obviously, everything should be compatible with licensing.

The code will be open source, but it is production code, so I do not want to be sloppy. What else should I do or am looking for? Are there any best practices?

+3
source share
8 answers

C ++ . . , , (make ) .

#ifdef LINUX #ifdef WINDOWS . , .

+1

Boost , ACE. , - . posix- Windows gcc cygwin, .

+5

Boost. , TR1, , <cstdint> - int32_t .. , shared_ptr .

Boost , ++. , , - optional, ptr_... . String , , .

, Boost.Filesystem - - , . Boost.MultiIndex - - , , .

+1

.NET Mono. .

0

, - (, Boost), , , , . , . ( ).

- ++ ( ). .

, ( ). - .

DLL ( .so Unix ), , - .

, , .

GPL , , LGPL. GPL ( LGPL), GPL.

0

TCLAP - CLI , . , , , ( ). API TCLAP .

Boost program_options shard, ABI. , getopt.

0

libparamset, (Windows, OS X, Linux) CLI. CLI ( , , , , ...) . C, C++.

0

Source: https://habr.com/ru/post/1726487/


All Articles