Code Monkey home page Code Monkey logo

Comments (7)

retep998 avatar retep998 commented on May 23, 2024

Are you using a full MingW-w64 setup or are you relying on the toolchain bundled with Rust? The bundled toolchain only comes with a few libraries and if you need something that isn't there you have to ditch the bundled toolchain and setup a full MingW-w64 instead.

from winapi-rs.

randomPoison avatar randomPoison commented on May 23, 2024

Yeah, I'm just using the bundled rust distribution. Would that matter for linking against Windows libraries, though? Does the full MingW distribution do extra stuff to help find the libraries?

from winapi-rs.

retep998 avatar retep998 commented on May 23, 2024

In order to link to a library, even a Windows system library, you cannot link to a .dll directly, there needs to be a .lib or .a to link to. Thus when using MingW we depend on the .a libraries provided by MingW. Rust bundles the libraries that are needed by the standard library, but things like xinput are not bundled and must be provided by a full MingW installation.

from winapi-rs.

randomPoison avatar randomPoison commented on May 23, 2024

Ah, that's good to know. I'll give it a shot and see if that's where the problem was coming from.

from winapi-rs.

chrisxue815 avatar chrisxue815 commented on May 23, 2024

I got a similar error ld: cannot find -ld3d9, which was later solved by installing the MSVC version of Rust (found here), and running cargo from VS2015 x64 Native Tools Command Prompt.

from winapi-rs.

retep998 avatar retep998 commented on May 23, 2024

The current Rust MSVC nightly should actually be able to auto-detect your VS installation so that it can find the libraries without having to use the VS command prompt.

To fix the issue on -gnu, the approach I'm taking is to bundle import libraries from mingw so that it will work with Rust out of the box. I just haven't done that for d3d9 yet.

from winapi-rs.

retep998 avatar retep998 commented on May 23, 2024

This is no longer an issue as winapi bundles all its own import libraries for MinGW targets.

from winapi-rs.

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.