Git Product home page Git Product logo

Comments (7)

dfed avatar dfed commented on August 9, 2024 1

Can you post what you tried in your BUCK file and what wasn't working about it? A PR against this repo as an example would be illustrative, and let us help you more efficiently.

For some background, they key for getting c++ working for us was having this line in the apple_lib call.

You should be able to create a first_party_cxx_library that looks very, very similar to first_party_library, except instead of the call to apple_lib you could use apple_cxx_lib. Of course, it might be even better to add a has_cxx flag to first_party_library, and have it call through to apple_cxx_lib instead of apple_lib, but then we'd need to conditionally change what we look for in sources just like we did for has_objective_c.

We don't have any first-party C++ code, so to be entirely honest this isn't high on our to-do list. But we're happy to help you get something working, especially if you'll contribute back to this repo 🙂

from bucksample.

thedavidharris avatar thedavidharris commented on August 9, 2024

prebuilt_cxx_library has some weird quirks with module maps that have to be configured with Buck too, for what it’s worth.

We have a C/C++/Obj-C/Swift all in one library compiled together, but going right from C++ to Swift has never been easy even within Xcode

from bucksample.

dfed avatar dfed commented on August 9, 2024

We have a C/C++/Obj-C/Swift all in one library compiled together

😱❗️

That's not a bridge we've crossed! If you're interested in contributing a PR, we'd love to have an example module like that in the repo.

from bucksample.

bachand avatar bachand commented on August 9, 2024

We have a C/C++/Obj-C/Swift all in one library compiled together

Y’all are adventurous. I like it 😉

from bucksample.

thedavidharris avatar thedavidharris commented on August 9, 2024

Hah I mean I wouldn’t suggest it, it mostly wraps the C++ code in Objective C which then gets used in Swift parts. That isn’t so bad with umbrella headers.

Importing modules that are cross language tends to be where we’ve had issues.

from bucksample.

gsabran avatar gsabran commented on August 9, 2024

Not an expert, but it compiles and runs #73

from bucksample.

dfed avatar dfed commented on August 9, 2024

#73 is merged. Closing this issue out since I believe it is resolved. Thank you again for the help!

from bucksample.

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.