Skip to content

Commit 9c25f11

Browse files
fixes on windows
1 parent 39a0a68 commit 9c25f11

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(${APP_NAME} LANGUAGES CXX)
77
set(CMAKE_CXX_STANDARD 17)
88

99
# Set to x86 for x86 architecture or x64 for x64 architecture
10-
set(ARCHITECTURE_TO_USE x86)
10+
set(ARCHITECTURE_TO_USE x64)
1111

1212
# Make the executable
1313
add_executable(${APP_NAME} main.cpp)
@@ -22,7 +22,7 @@ if(WIN32)
2222
file(COPY ${GLEW_SHARED_LIB} DESTINATION ${CMAKE_BINARY_DIR}/)
2323
find_package(OpenGL REQUIRED)
2424
# Link libs
25-
target_link_libraries(${APP_NAME} ${OPENGL_LIBRARIES} ${GLEW_SHARED_LIB} ${GLFW_SHARED_LIB})
25+
target_link_libraries(${APP_NAME} ${OPENGL_LIBRARIES} ${GLEW_STATIC_LIB} ${GLFW_STATIC_LIB})
2626
else()
2727
SET(LINK_GL_LIBS ${CMAKE_SOURCE_DIR}/lib/linux)
2828
set(GLFW_STATIC_LIB ${LINK_GL_LIBS}/libglfw3.a)

main.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ int main() {
1212
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
1313
GLFWwindow* window = glfwCreateWindow(600, 300, "Test", NULL, NULL);
1414
glfwMakeContextCurrent(window);
15-
if(window) {
16-
std::cerr << "Failed to create window" << std::endl;
17-
glfwTerminate();
18-
exit(EXIT_FAILURE);
19-
}
2015

2116
if(GLenum err = glewInit(); err != GLEW_OK) {
2217
std::cout << glewGetErrorString(err) << std::endl;

0 commit comments

Comments
 (0)