Linker Error I don't understand.

Sysprogs forums Forums VisualGDB Linker Error I don't understand.

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34251
    DonMilne
    Participant

    I am working with a ARM64 Linux toolchain that I had you SysProgs guys put together for me last year (Variscite DART-MX8M-PLUS). It works great, I’ve also incidentally played with building code for an Ubuntu amd64 VPS, and that works great too. I’m not too familiar with Linux but I’ve enjoyed learning to develop for it while staying with my favourite IDE.

    My Variscite project currently uses the MSBuild build system. VisualGDB package manager says everything is up to date.

    Anyway, I’m trying to do something new: link a library that a third party created for us, developed with Linux tools for the same DART board. Eventually I’ll have source code but for the moment I do not. I have header files and a lib file called “libmicropack_arm.a”.

    Now I am admittedly not very familar with Linux conventions, so at first bash to link with this library I got lots of unresolved references to functions xxx and yyy.  However I worked out where I have to configure an additional library path, and that I have to specify the library name as “micropack_arm” rather than “libmicropack_arm”. That fixed the unresolved references, but now the build aborts with the error:

    “Build failed: aarch64-fslc-linux-g++.exe exited with code 1
    aarch64-fslc-linux-g++.exe: error: micropack_arm: No such file or directory”

    I confess that I don’t understand this. If I had named or located the library incorrectly then it couldn’t have resolved those function names. So the linker was able to find my lib file… so what part of the build system is still complaining about “no such file”?  I’d appreciate some advice!

    I’ve tried looking through log files etc for a more verbose error message and not found anything useful, but if there’s something you’d like to see, do let me know.

    • This topic was modified 1 year, 6 months ago by DonMilne.
    #34253
    DonMilne
    Participant

    And wouldn’t you know it. I post the message and go cut the grass. When I come back I immediately think of something new to try, which is to specify the complete path and filename as an “Additional linker input”.  Now it works.

    I can make progress now, but I’d still be interested in knowing why my original attempt failed?

    #34254
    support
    Keymaster

    Hi,

    The GNU linker indeed has a few quirks that could be somewhat confusing. A good starting point would be this page that explains the differences between different input types, and also suggests how to obtain extra diagnostic output.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.