Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dealing with macports' placement of libraries #45

Open
jbclements opened this issue Mar 3, 2013 · 1 comment
Open

dealing with macports' placement of libraries #45

jbclements opened this issue Mar 3, 2013 · 1 comment

Comments

@jbclements
Copy link

MacPorts puts libraries in /opt/local/lib, which causes problems in two places: first, in the configure file, /opt/local/lib isn't one of the places it looks for the .dylib files. That's easy enough to hack in. Slightly more problematically, I couldn't figure out how to add "-L /opt/local/lib" into the linker flags. I finally just jammed it directly into the linker flags source in sdl.rs, using

// Setup linking for all targets.
#[cfg(target_os="macos")]
mod mac {
    #[cfg(mac_framework)]
    #[link_args="-framework SDL"]
    extern {}

    #[cfg(mac_dylib)]
    #[link_args="-L /opt/local/lib -lSDL"]
    extern {}
}

... but that's completely gross. I didn't see a way to do computation on the right-hand-side of the #[link_args=...] attribute, though I didn't spend more than 5 minutes digging.

@AngryLawyer
Copy link
Collaborator

Hrm, a tough one. What happens if you add

RUSTFLAGS+=-L /opt/local/lib

to the Makefile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants