allegro not working with clion (0xC000007B)

1

so I've hit a dead end, I'm simplying trying to run the following:

main.cpp:

#include <iostream>
#include <allegro5/allegro.h>

int main(int argc, char **argv) {
    std::cout << "Hello, World!" << std::endl;
    al_init();
    std::cout << "hi" << std::endl;
    return 0;
}

CMakeList.txt:

cmake_minimum_required(VERSION 3.6)
project(allegro_test)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp)
SET(ALLEGRO_ROOT C:/Users/duck-/workspace/cpp/recources/allegro/)

INCLUDE_DIRECTORIES( ${ALLEGRO_ROOT}/include )
LINK_DIRECTORIES( ${ALLEGRO_ROOT}/lib)

add_executable(allegro_test ${SOURCE_FILES})

TARGET_INCLUDE_DIRECTORIES(allegro_test PUBLIC ${ALLEGRO_ROOT})
TARGET_LINK_LIBRARIES(allegro_test allegro)

output:

"C:\Users\duck-\.CLion2016.2\system\cmake\generated\allegro test-50fbd97d\50fbd97d\Debug\allegro_test.exe"

Process finished with exit code -1073741701 (0xC000007B)

I'm using allegro-mingw-gcc6.2.0-x64-dynamic-5.2.2.zip from here and have copyied allegro-5.2.dll, cygintl-1.dll & cygintl-2.dll to

C:\Users\duck-.CLion2016.2\system\cmake\generated\allegro test-50fbd97d\50fbd97d\Debug\

where the program's executed. I've installed .NET Framework 4.6.2. Am I missing something? cheers in advance.

c++
clion
allegro5
asked on Stack Overflow Jan 20, 2017 by Dead_S

1 Answer

0

Since you are building the program in a Debug configuration, you'll need to include allegro-debug-5.2.dll, and not just allegro-5.2.dll.

answered on Stack Overflow Feb 10, 2017 by DrEllisD

User contributions licensed under CC BY-SA 3.0