Giter Club home page Giter Club logo

Comments (4)

jschwe avatar jschwe commented on July 20, 2024

Note: I edited your description slightly to hide the log in a spoiler comment.

Does cxx-qt use corrosion_link_libraries() to tell corrosion to link with QTCore? If that is the case, then patching corrosion_link_libraries() to check if the FRAMEWORK target property is set, and passing -framework instead sounds like it might solve your problem.

from corrosion.

dezbracaty avatar dezbracaty commented on July 20, 2024

Not: I edited your description slightly to hide the log in a spoiler comment.

Does cxx-qt use corrosion_link_libraries() to tell corrosion to link with QTCore? If that is the case, then patching corrosion_link_libraries() to check if the FRAMEWORK target property is set, and passing -framework instead sounds like it might solve your problem.

Thanks for replying .
I had tried this function and you can see it in this photo.
image
And I don't think this function is useful because it only add -L flag ,but -L is wrong .

function(corrosion_link_libraries target_name)
    if(TARGET "${target_name}-static" AND NOT TARGET "${target_name}-shared")
        message(WARNING "The target ${target_name} builds a static library."
            "The linker is never invoked for a static libraries to link has effect "
            " aside from establishing a build dependency."
            )
    endif()
    add_dependencies(_cargo-build_${target_name} ${ARGN})
    foreach(library ${ARGN})
        set_property(
            TARGET _cargo-build_${target_name}
            APPEND
            PROPERTY CARGO_DEPS_LINKER_LANGUAGES
            $<TARGET_PROPERTY:${library},LINKER_LANGUAGE>
        )

        corrosion_add_target_local_rustflags(${target_name} "-L$<TARGET_LINKER_FILE_DIR:${library}>")
        corrosion_add_target_local_rustflags(${target_name} "-l$<TARGET_LINKER_FILE_BASE_NAME:${library}>")
    endforeach()
endfunction(corrosion_link_libraries)

And I had modified -L to -F , It not work too.

from corrosion.

jschwe avatar jschwe commented on July 20, 2024

And I don't think this function is useful because it only add -L flag ,but -L is wrong .

What i was trying to say, is that if the -L flag in question comes from corrosion_link_libraries, then patching corrosion_link_libraries to emit -F for frameworks might fix your issue. But it seems you are saying the problematic -L is not added by corrosion_link_libraries, but from somewhere else instead (presumably cxx-qt` code). Thus your specific problem likely needs to be fixed upstream in cxx-qt and not here.

I'm still leaving this issue open, since making corrosion_link_libraries check if a library is a framework or not is probably the correct thing to do, regardless of it is related to your specific issue or not.

from corrosion.

dezbracaty avatar dezbracaty commented on July 20, 2024

And I don't think this function is useful because it only add -L flag ,but -L is wrong .

What i was trying to say, is that if the -L flag in question comes from corrosion_link_libraries, then patching corrosion_link_libraries to emit -F for frameworks might fix your issue. But it seems you are saying the problematic -L is not added by corrosion_link_libraries, but from somewhere else instead (presumably cxx-qt` code). Thus your specific problem likely needs to be fixed upstream in cxx-qt and not here.

I'm still leaving this issue open, since making corrosion_link_libraries check if a library is a framework or not is probably the correct thing to do, regardless of it is related to your specific issue or not.

Thank you for replying! You are right ! It only works when I modify build.rs in cxx-qt .
I think there are still two questions :
1 How can I send -F flag to cxx-qt .
2 Do I need to check the framework or library in corrosion? And even if corrosion is checked, what can it do?

from corrosion.

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.