Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Non Qt project (Cmake) - troubles with linking to library

$
0
0
Hi guys, I freshly installed Qt Creator with MinGW and Cmake. I’m trying to play with OpenGL. So far I got this code: #include <GLFW/glfw3.h>   int main() {     if (!glfwInit()) {         return -1;     }       return 0; } My CMakeLists.txt is like this: cmake_minimum_required(VERSION 2.8) project(world_0)   aux_source_directory(. SRC_LIST) file(GLOB SRC_LIST *.cpp)   find_package(GLFW3 REQUIRED)   include_directories(F:/u_qt/libs/glfw/glfw-3.0.1/include) link_directories(F:/u_qt/libs/glfw/glfw-3.0.1/lib-mingw)   add_executable(${PROJECT_NAME} ${SRC_LIST}) target_link_libraries(${PROJECT_NAME} glfw3) I’ve added FindGLFW3.cmake from FindGLFW3.make [raw.github.com] But still got ‘undefined reference’ error. I will be glad to hear any feedback from you guys. Cheers.

Viewing all articles
Browse latest Browse all 2113

Trending Articles