heremaps / gluecodium

Cross-language bindings generator for C++, Java, Swift, and Dart
Apache License 2.0
202 stars 27 forks source link

Create example project #48

Closed DanielKamkha closed 11 months ago

DanielKamkha commented 4 years ago

[Original issue by @Dschoordsch ]

As a new user of Gluecodium setting up a new project, there is a lot of things that can go wrong. I would like to simply copy an existing project and follow the comments inside.

Currently hello world example doesn't serve this purpose:

hello world CMake.txt is not standalone but requires two additional lines from the CMake file in parent folder, that should be fixed. requires apigen CMake modules which is not documented (also not how to obtain those) requires external build scripts to set the generator (should be a documented CMake option instead) is missing comments on what to change

Existing Hello World project should be deleted (while preserving functional tests as a non-UI test suite).

linsang21 commented 2 years ago

Hi there, I'm trying to check the progress on creating the example project. The project itself is well documented, but it'd be much helpful for me to have some reference on how to integrate with the existing project.

To be specifically, what I'm looking for is that I have a C++ project built by CMake into a static library and public C++ headers, which I'd like to export as Swift version so can be used on MacOS/ iOS.

Hsilgos commented 2 years ago

Hi @linsang21 , there are plenty of samples in cmake tests were you may choose the variant of project configuration which suits you. This is good entry point to start. Reading your description you need something very basic like this, but may be framework should be static. After initial setup you may refer functional tests which contain a lot of lime file examples.

linsang21 commented 2 years ago

Thanks @Hsilgos. I was able to figure out the setup after referencing tests. There's one error I want to point out when using cmake.

The build gradle seems out of date for getting the library. I had to changed to below to make build work.

...
repositories {
    mavenLocal()
    mavenCentral()
    maven { url 'https://jitpack.io' } // Added for gluecodium
    google() // Added for  com.android.tools.build:gradle:4.1.2
}

apply plugin: 'application'

dependencies {
    runtime "com.github.heremaps:gluecodium:$version" // Changed path to github
}
...
sneurlax commented 11 months ago

Hi @linsang21 , there are plenty of samples in cmake tests were you may choose the variant of project configuration which suits you. This is good entry point to start. Reading your description you need something very basic like this, but may be framework should be static. After initial setup you may refer functional tests which contain a lot of lime file examples.

This isn't helpful to me. An example project, a walkthrough/tutorial, or better documentation would make this project more usable. As-is, it's hard to figure out how to get it working at all, how to use the generated outputs, if the output is valid, etc. The output just looks invalid and unusable.

Hsilgos commented 11 months ago

Hi @linsang21 , there are plenty of samples in cmake tests were you may choose the variant of project configuration which suits you. This is good entry point to start. Reading your description you need something very basic like this, but may be framework should be static. After initial setup you may refer functional tests which contain a lot of lime file examples.

This isn't helpful to me. An example project, a walkthrough/tutorial, or better documentation would make this project more usable. As-is, it's hard to figure out how to get it working at all, how to use the generated outputs, if the output is valid, etc. The output just looks invalid and unusable.

Fair enough, I'll add example soon

Hsilgos commented 11 months ago

@linsang21, @sneurlax, Hi. Try the example