首页 > 解决方案 > 使用 gradle-native cpp-application & cpp-library 插件构建一个 cpp 应用程序

问题描述

我尝试使用 gradle-native(cpp-application 和 cpp-library 插件)成功构建简单的 cpp 项目。

我想使用 gradle-native 进行更复杂的操作,但不幸的是我失败了......即使尝试在 gradle-native/samples 上模拟样本!我已经花了几个小时了:(

这是我想做的:

server (cpp-application) -> depends on driver or factory
driver (cpp-library) 
  |---core (cpp-library)
  |---alsa (cpp-libary with linux operating system) -> depends on core
  |---asio (cpp-library with windows operating system) -> depends on core
  |---factory (the resulting library which should use either linux or windows library) -> depends either on alsa, either on asio according to the operating system

或者

server (cpp-application) -> depends on driver
driver (cpp-library)
  |---core (cpp-library)
  |---alsa (cpp-libary with linux operating system) -> depends on core
  |---asio (cpp-library with windows operating system) -> depends on core
  |---src/ (the resulting library which should use either linux or windows          library) -> depends either on alsa, either on asio according to the operating system

请问有人有解决办法吗?谢谢 !问候

标签: c++gradlemulti-modulegradle-native

解决方案


推荐阅读