Coder Social home page Coder Social logo

Comments (13)

kylef avatar kylef commented on July 16, 2024

Does PathKit.framework get built into Carthage/Build/Mac/?

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Yup - it's in the second code block (I edited my post right after I pressed submit).

from pathkit.

kylef avatar kylef commented on July 16, 2024

Just curious, can you try the following before running ./main:

$ install_name_tool -add_rpath "@executable_path/Carthage/Build/Mac/"  "main"

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Huh... that worked. I've never heard of that command before. What does it do?

Output:

$ ./main
/Users/dan/Desktop/test

from pathkit.

kylef avatar kylef commented on July 16, 2024

I've written about it at https://github.com/kylef/Commander#installation

When you said it works perfectly for other frameworks, we're you doing this the exact same way? With swiftc?

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Yup - take a look at the build script for MastCLI if you need an example.

from pathkit.

kylef avatar kylef commented on July 16, 2024

@Danappelxx I think MastCLI is only working because you haven't used any APIs from Commander only imported it.

Once you try using Commander, without the Commander framework available in the rpath it will not run too.

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Src/main.swift uses Commander.

from pathkit.

kylef avatar kylef commented on July 16, 2024

Ah missed that file, was looking in src/Command.swift.

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Hm... adding install_name_tool -add_rpath "@executable_path/Carthage/Build/Mac/" "bin/mast" to my setup script in MastCLI doesn't fix the PathKit issue I'm having. Would you happen to know why?

from pathkit.

kylef avatar kylef commented on July 16, 2024

@Danappelxx The rpath you've shown is relative to executable path, and Carthage isn't inside the bin directory.

Should become:

$ install_name_tool -add_rpath "@executable_path/../Carthage/Build/Mac/" "bin/mast"

from pathkit.

Danappelxx avatar Danappelxx commented on July 16, 2024

Man, you really know your stuff - thanks!

from pathkit.

kylef avatar kylef commented on July 16, 2024

Going to close this since it looks like we've resolved the problem.

from pathkit.

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.