3

I'm to trying compile simple program which uses FMOD with CMake. Compilation seems to be alright but my application crashes with 0xC0000135 which is STATUS_DLL_NOT_FOUND

My CMakeList.txt

cmake_minimum_required(VERSION 3.7)
project(fmod-test)

set(FMOD_DIR "D:/FMOD SoundSystem/FMOD Studio API Windows")
set(CMAKE_CXX_STANDARD 11)

set(SOURCE_FILES main.cpp)

add_executable(fmod-test ${SOURCE_FILES})

include_directories(${FMOD_DIR}/api/lowlevel/inc ${FMOD_DIR}/api/studio/inc)

link_directories("${FMOD_DIR}/api/lowlevel/lib" "${FMOD_DIR}/api/studio/lib")
target_link_libraries(fmod-test
    "${FMOD_DIR}/api/lowlevel/lib/fmod_vc.lib"
    "${FMOD_DIR}/api/studio/lib/fmodstudio_vc.lib")

Is this a problem with my cmake config or environment? Should I put DDLs in some specific place or provide path to them somethere besided CMakeLists.txt?

Daniil Dubrovsky
  • 459
  • 7
  • 17
  • 1
    Not a windows guy, but as a first shot try putting the dll next to the executable, if I remember correctly that is the first place windows looks. I am not sure how the other searchpaths for dlls are set up – ted Aug 22 '17 at 23:33
  • 1
    Could also update the 'path' environment variable to include path of dll if exe is in different location - you want to keep track though, try to avoid dll hell – kvr Aug 22 '17 at 23:40
  • Thanks krv, that helped – Daniil Dubrovsky Aug 23 '17 at 00:10

1 Answers1

0

Solved by adding api/lowlevel/lib and api/studio/lib to the PATH variable.

Kudos to kvr for suggestion.

Daniil Dubrovsky
  • 459
  • 7
  • 17