Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Can`t link FMOD in Windows.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Can`t link FMOD in Windows.

Scheduled Pinned Locked Moved General and Desktop
13 Posts 2 Posters 4.8k Views 1 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.
  • H Offline
    H Offline
    heatblazer
    wrote on last edited by
    #4

    OK. Here is what Ive changed: @ win32 { message("*using settings for windows") #FMOD INCLUDEPATH += /home/ilian/QT5/MathForFun/FMOD/Win32/api/lowlevel/inc/ LIBS += -L/home/ilian/QT5/MathForFun/FMOD/Win32/api/lowlevel/lib/ -lfmod } @ Now I get completely missing all of the functions I called with FMOD: @ Z:\home\ilian\QT5\MathForFun\FModePlayer.cpp:-1: error: undefined reference to FMOD::System::createSound(char const*, unsigned int, FMOD_CREATESOUNDEXINFO*, FMOD::Sound**)@20'
    @

    So like I can`t get why is that :(

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #5

      I know little about wine, but shouldn't you include the drive letter in the paths?
      And have you re-run qmake after the changes?

      1 Reply Last reply
      0
      • H Offline
        H Offline
        heatblazer
        wrote on last edited by
        #6

        I`ve tried with
        @
        LIBS += Z:/home/ilian/QT5/MathForFun/FMOD/Win32/api/lowlevel/lib/
        @
        and got this
        @
        :-1: error: cannot find Z:/home/ilian/QT5/MathForFun/FMOD/Win32/api/lowlevel/lib/: Permission denied
        @
        Weird stuff... I should try building it on real Windows with VSC :(

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #7

          Sounds reasonable. Maybe try to chmod the permissions for that directory.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            heatblazer
            wrote on last edited by
            #8

            I did. Nothing happened. Ive also tried to point to this folder: @ Z:/home/ilian/.wine/drive_c/Program Files/FMOD SoundSystem/FMOD Studio API Windows/api/lowlevel/lib/ @ Apparently where Ive installed the fmod, but it tells me that
            @
            :-1: error: error: /home/ilian/.wine/drive_c/Program\Files/FMOD: No such file or directory
            @
            Really no idea....

            1 Reply Last reply
            0
            • Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #9

              You've got a space in the folder name "FMOD SoundSystem". Tools hate that.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                heatblazer
                wrote on last edited by
                #10

                So what should I do? Rename my dirs?
                [quote author="Chris Kawa" date="1419069554"]You've got a space in the folder name "FMOD SoundSystem". Tools hate that.[/quote]

                1 Reply Last reply
                0
                • Chris KawaC Offline
                  Chris KawaC Offline
                  Chris Kawa
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  Either that or copy the relevant files to some path without spaces e.g. your app directory or something.

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    heatblazer
                    wrote on last edited by
                    #12

                    Here: http://www.qtcentre.org/threads/2831-Qt-and-fmod is a guy who says its working. However I dont have libfmodex.a to my download for Windows. I have libfmod.a and libfmodL.a. I changed to this:
                    @
                    INCLUDEPATH += Z:/home/ilian/.wine/drive_c/FMODSoundSystem/FMODStudioAPIWindows/api/lowlevel/inc/
                    LIBS += Z:/home/ilian/.wine/drive_c/FMODSoundSystem/FMODStudioAPIWindows/api/lowlevel/lib/libfmod.a
                    @
                    But I still get the undefined references to all fmod functions I`ve called.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      heatblazer
                      wrote on last edited by
                      #13

                      Thank you, mr.Chris Kawa. I was able to make it work in Wine + MinGW. Apparenlty Ive read there were C++ ABI problems, so Ive changed my function to the pure C API they support like that:
                      @
                      bool FMPlayer::systemInit(const char *fname, int len) {

                      FMOD_CREATESOUNDEXINFO *info = new FMOD_CREATESOUNDEXINFO();
                      info->cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
                      info->length = len;
                      FMOD_CHANNEL *channel;
                      //FMOD::Channel* channel;
                      //FMOD::System* system;
                      //FMOD::Sound* sound;
                      //FMOD::System_Create(&system);
                      FMOD_SYSTEM *system;
                      FMOD_SOUND *sound;
                      FMOD_System_Create(&system);
                      FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0);
                      
                      //system->init(32, FMOD_INIT_NORMAL, 0);
                      if ( FMOD_OK == ( FMOD_System_CreateSound(system,
                                            fname,FMOD_OPENMEMORY, info, &sound)) ) {
                      

                      // if ( FMOD_OK == system->createSound(fname,
                      // FMOD_OPENMEMORY, info, &sound) ) {

                          FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);
                      

                      // sound->setMode(FMOD_LOOP_OFF);
                      // system->playSound(sound, false, 0, &channel);
                      FMOD_System_PlaySound(system, sound, false, 0, &channel);
                      return true;
                      } else {
                      return false;
                      }
                      }
                      @
                      Ive left the commented code to see what Ive changed. Now it plays the desired sound... Whew. That was nasty. I got worried I wont be able to fix it. Thanks for the help. Ill avoid and whitespaces from now on. Regards from a newbie coder like me :)

                      1 Reply Last reply
                      0

                      • Login

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