Giter VIP home page Giter VIP logo

Comments (13)

TommyKaneko avatar TommyKaneko commented on September 14, 2024

My project that I use it for is a private project.

I have an XCode project for the Cpp Wrapper, which outputs a dylib. For my private project, I have the CppWrapper as a subproject, so updates on CppWrapper can be rebuilt at the same time as my private project.

For the cpp files that I create, I include the header files from the CppWrapper like this:
#include <SUAPI-CppWrapper/Geometry.hpp>

Shall I share the XCode project for this?

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

To easily consume this wrapper library it would be nice to have projects for Visual Studio and Xcode that builds static libs. That way the user of the link can just add references to these static libs. (Similar to how you consume GoogleTest and other projects.)

Another snag I ran into when trying to set up a GoogleTest project, I needed to move the "SUAPI-CppWrapper" under a sub-directory to avoid conflating includes. My current dev branch I moved it to src/SUAPI-CppWrapper.

That's a rather common setup since a project typically needs tests as well as the source along side.

+ Project Root
  + src/
  + tests/
  + resources/

Ultimately it's up to you - but I'll try to set up an example of how it can be provided as a static lib with tests.

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

I'm seeing some errors and warnings when building with VS2017:

image

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

The #ifdef isn't working right:

image

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

std::transform is missing the include header for it. (Another reason to keep the wrapper in a separate static lib so include paths doesn't get mixed up with other projects.)

image

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

Might be worth enabling treating warnings as errors.

image

What is that piece of code doing? Is it capping rhs into the range of -2PI to +2PI? (If so, modulo might be an alternative.)

from sketchup-api-c-wrapper.

TommyKaneko avatar TommyKaneko commented on September 14, 2024

Thanks for your big review of the code today, ThomThom. I will get on all those issues over the next week!

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

I think this should do the same - while avoiding the warnings.

image

My current dev branch is here: https://github.com/thomthom/Sketchup-API-C-Wrapper/tree/dev-vs-project

from sketchup-api-c-wrapper.

TommyKaneko avatar TommyKaneko commented on September 14, 2024

FYI - I have uploaded my XCode environment here:
https://github.com/TommyKaneko/Sketchup-API-C-Wrapper/tree/xcode_project

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

I've been looking into CMake recently to simplify cross platform development. Maybe a CMake project file could be useful for this project? VSCode and Visual Studio has nice integration with CMake.

from sketchup-api-c-wrapper.

TommyKaneko avatar TommyKaneko commented on September 14, 2024

I think you have already implemented this no:
https://github.com/TommyKaneko/Sketchup-API-C-Wrapper/tree/master/cmake

from sketchup-api-c-wrapper.

thomthom avatar thomthom commented on September 14, 2024

😱😵!!

I really have no recollection of doing that!

But I see there's a few TODO notes. And I've been reading up a book on CMake, diving into best practices and learning a lot more about it. So I'll probably come back and revisit this.

With GitHub having CI now we can set up test builds to test that the various project solutions work.

from sketchup-api-c-wrapper.

TommyKaneko avatar TommyKaneko commented on September 14, 2024

You were on autopilot! Nothing wrong with that.
I am poorly informed on the compiler side of things, so I will have to trust you to get it right.
Travis CI has been set up for this project for Doxygen generation: https://tommykaneko.github.io/Sketchup-API-C-Wrapper/html/

Feel free to add to it.

from sketchup-api-c-wrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.