0

I am trying to add sounds to a qt project but when i try to link the library with the code:

INCLUDEPATH += "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\inc"
LIBS += "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib -libfmodex"

i get the following error :

error: C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib -libfmodex: No such file or directory

and if i use the following lines i get bunch of "undefined referece" errors

INCLUDEPATH += "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\inc"
LIBS += -L"C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib -libfmodex"

i checked all other fmod related questions in stackoverflow but couldnt find any solution. can anyone please help me with this problem?

QT creator 4.0.0 based on version 5.6, fmod version 1.07.04

Ahmet Bat
  • 13
  • 5
  • *LIBS += -L"C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib" -fmodL_vc.lib* result is : error: unrecognized command line option '-fmodL_vc.lib' – Ahmet Bat Jul 14 '16 at 16:33
  • 1
    **SOLUTION** this is what worked for me `win32{ INCLUDEPATH += "D:\FMOD Studio API Windows\api\lowlevel\inc" DEPENDPATH += "D:\FMOD Studio API Windows\api\lowlevel\inc" LIBS += -L"D:\FMOD Studio API Windows\api\lowlevel\lib" -lfmod_vc }` – Ahmet Bat Jul 19 '16 at 02:06

1 Answers1

0

LIBS += -L"C:/Program Files (x86)/FMOD SoundSystem/FMOD Studio API Windows/api/lowlevel/lib/" -lfmodex

Pay attention to " closing folder and NOT including -lfmodex

Also read this very good answer

Community
  • 1
  • 1
mvidelgauz
  • 2,176
  • 1
  • 16
  • 23
  • thank you for your comment but this is the result: error: cannot find -lfmodex collect2.exe:-1: error: error: ld returned 1 exit status – Ahmet Bat Jul 14 '16 at 15:33
  • Sorry, I pointed to obvious syntax error, if you still have that error check if library actually exists there and post your **current** `LIBS+` statement – mvidelgauz Jul 14 '16 at 15:36
  • there is no lfmodex in the lib folder. libfmod.a, libfmodL.a... this is the current line : LIBS += -L"C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib" -lfmodex – Ahmet Bat Jul 14 '16 at 15:38
  • There are also `fmod_vc.lib`, `fmod64_vc.lib`, `fmodL_vc.lib` and `fmodL64_vc.lib` files. You need to link with one of them depending on your project configuration (32 or 64 bits?) – mvidelgauz Jul 14 '16 at 15:46
  • 32bits, i should choose fmod_vc_lib maybe? – Ahmet Bat Jul 14 '16 at 15:50
  • From documentation: "fmod_vc.lib - Release 32-bit binary for production code", "fmodL_vc.lib - Release 32-bit binary with logging enabled for development". It seems you are currently at development stage... – mvidelgauz Jul 14 '16 at 15:59
  • i am not sure if i understand what that means. – Ahmet Bat Jul 14 '16 at 16:03
  • I suggest you to use `fmodL_vc.lib` at the current stage because it will emit log records, which will be usful for further development and debugging. Please read documentaion – mvidelgauz Jul 14 '16 at 16:09