Question

  • Creator
    Topic
  • #3978682

    How to install a library on mingw in linux

    by cedilla-gondola.0a ·

    Tags: 

    I am trying to compile my c++ code for windows with this command :

    x86_64-w64-mingw32-g++ main.cpp -lSDL2 -lSDL2_image -lSDL2_ttf -o windows32.exe

    but I get #include <SDL2/SDL.h> which I don’t get when compiling with g++.

    How can I install these libraries for mingw in linux?

You are posting a reply to: How to install a library on mingw in linux

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

  • Author
    Replies
    • #4004481

      Reply To: How to install a library on mingw in linux

      by techguy98 ·

      In reply to How to install a library on mingw in linux

      download zlib-1.2.5.tar.gz.
      tar -zxvf zlib-1.2.5.tar.gz.
      cd zlib-1.2.5.
      ./configure –prefix=/mingw.
      make.
      make install.
      gcc -shared -o /mingw/bin/zlib1.dll -Wl,–out-implib=/mingw/lib/libz.dll.a [!em]*.o.

      This may help.

Viewing 0 reply threads