Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to set up the Bass Audio Library for Qt 6 MinGW
Forum Updated to NodeBB v4.3 + New Features

How to set up the Bass Audio Library for Qt 6 MinGW

Scheduled Pinned Locked Moved Solved Game Development
5 Posts 3 Posters 969 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by 8Observer8
    #1

    I read this topic using Bass with MingW It seems like it is possible to use it with MinGW. But I have problems with Qt Creator settings.

    My steps:

    • I downloaded the Bass library here: https://www.un4seen.com/
    • I added it to my project:

    788a8530-b9b5-4ca9-9e02-1c9c3108a8ec-image.png

    1e84fbd2-60c0-4b5b-9049-84612b235a48-image.png

    a541547d-c71c-47c3-b379-34267feb3232-image.png

    05e820e6-c7ec-4111-a7e9-a7f86304c1d0-image.png

    fdae020b-1732-4484-94e3-3e71820cdefd-image.png

    I include it like this:

    INCLUDEPATH += ".\libs\bass24-windows\include"
    LIBS += -L".\libs\bass24-windows\x64"
    LIBS += -lbass
    
    #include "widget.h"
    #include <bass.h>
    
    Widget::Widget(QWidget *parent)
        : QWidget(parent)
    {
        BASS_GetVersion();
    }
    

    I have this error: error: cannot find -lbass

    I tried to add bass.dll:

    INCLUDEPATH += ".\libs\bass24-windows\include"
    LIBS += -L".\libs\bass24-windows\x64\bass.dll"
    

    But I have this error: error: undefined reference to BASS_GetVersion

    Chris KawaC 1 Reply Last reply
    0
    • 8Observer88 8Observer8

      I read this topic using Bass with MingW It seems like it is possible to use it with MinGW. But I have problems with Qt Creator settings.

      My steps:

      • I downloaded the Bass library here: https://www.un4seen.com/
      • I added it to my project:

      788a8530-b9b5-4ca9-9e02-1c9c3108a8ec-image.png

      1e84fbd2-60c0-4b5b-9049-84612b235a48-image.png

      a541547d-c71c-47c3-b379-34267feb3232-image.png

      05e820e6-c7ec-4111-a7e9-a7f86304c1d0-image.png

      fdae020b-1732-4484-94e3-3e71820cdefd-image.png

      I include it like this:

      INCLUDEPATH += ".\libs\bass24-windows\include"
      LIBS += -L".\libs\bass24-windows\x64"
      LIBS += -lbass
      
      #include "widget.h"
      #include <bass.h>
      
      Widget::Widget(QWidget *parent)
          : QWidget(parent)
      {
          BASS_GetVersion();
      }
      

      I have this error: error: cannot find -lbass

      I tried to add bass.dll:

      INCLUDEPATH += ".\libs\bass24-windows\include"
      LIBS += -L".\libs\bass24-windows\x64\bass.dll"
      

      But I have this error: error: undefined reference to BASS_GetVersion

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      .\ in INCLUDEPATH is your project dir. .\ in LIBS is your build dir, so if you have a shadow build next to your source tree the path is rather going to be something like this:

      LIBS += -L"..\show-version-bass-qt6-cpp\libs\bass24-windows\x64"
      
      8Observer88 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        In addition to @Chris-Kawa, you can use $$PWD rather than the dot to use the full path to your source folder.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        8Observer88 1 Reply Last reply
        2
        • Chris KawaC Chris Kawa

          .\ in INCLUDEPATH is your project dir. .\ in LIBS is your build dir, so if you have a shadow build next to your source tree the path is rather going to be something like this:

          LIBS += -L"..\show-version-bass-qt6-cpp\libs\bass24-windows\x64"
          
          8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by
          #4

          @Chris-Kawa thank you very much!

          INCLUDEPATH += ".\libs\bass24-windows\include"
          LIBS += -L"..\show-version-bass-qt6-cpp\libs\bass24-windows\x64"
          LIBS += -lbass
          
          #include "widget.h"
          #include <bass.h>
          
          Widget::Widget(QWidget *parent)
              : QWidget(parent)
          {
              BASS_GetVersion();
          }
          
          Widget::~Widget()
          {
          }
          
          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            In addition to @Chris-Kawa, you can use $$PWD rather than the dot to use the full path to your source folder.

            8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by
            #5

            @SGaist said in How to set up the Bass Audio Library for Qt 6 MinGW:

            $$PWD

            Yes, it works! Thanks!

            INCLUDEPATH += ".\libs\bass24-windows\include"
            LIBS += -L$$PWD\libs\bass24-windows\x64
            LIBS += -lbass
            
            1 Reply Last reply
            0
            • 8Observer88 8Observer8 has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved