0

I am creating a C++ shared library and targeting multiple platforms (Android, iOS and Windows). Usually, I use this step to the create the shared library. I first create a Console DLL Windows library project which creates dll share library I can use for testing on Windows.

The problem is that when I want to build the project to generate Android and iOS shared libraries, I have to create a new project then select "Dynamic Shard Library (Android)" and "Dynamic Shard Library (iOS)" and then manually copy the existing C++ header and source files to that new Project. I basically have to create new project for each platform. After this, I have to change some settings to match the settings from the original C++ Windows project.

This is tiresome and I can't continue to do it like this.

Is there a way to add more target platforms to an existing project without creating new project? I just want to be able to change the platform then build the project from one project only. Is this possible?

Programmer
  • 121,791
  • 22
  • 236
  • 328
  • 1
    Have you looked into using tool like CMake to generate a makefile for each platform? – MrEricSir May 10 '18 at 21:09
  • I know about CMake but want to know if this can be done inside the VS Editor alone. Since there are already menu's to add more platforms while creating new projects without messing with CMake, I want to know if there is one to add to the existing project without messing with CMake too. – Programmer May 10 '18 at 21:22
  • 1
    There is definitely no need to copy files. Why would you do this? Settings could be a different matter since they may be different on other platforms. – user7860670 May 10 '18 at 21:22
  • When you create new project, it is empty. You copy the files to the new project....Yes, this part can be solved with CMake but can you do this without creating CMake file and just through the Edior settings? – Programmer May 10 '18 at 21:25
  • 1
    You can add files to the new project without copying them. Just right click your empty project and select Add->Existing Item. Then point to the files. – Bo Persson May 10 '18 at 22:01
  • @BoPersson Thanks. I just tried that and it's a the saver. You can actually add multiple files from there at the-same time. I just wish that a new platform can be added to the existing platform without creating new project at-all. – Programmer May 10 '18 at 22:47

0 Answers0