Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 21, 2017
1 parent baa5d90 commit 4c92689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ IF (WIN32)

SET (QGIS_APP_SRCS ${QGIS_APP_SRCS} main.cpp ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
SET (QGIS_APPMAIN_SRCS mainwin.cpp)
SET_SOURCE_FILES_PROPERTIES(mainwin.cpp PROPERTIES COMPILE_FLAGS -DMAINWIN_DLL=\\\"qgis_app.dll\\\")

IF (MSVC)
SET (QGIS_APPMAIN_SRCS ${QGIS_APPMAIN_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/qgis_win32.rc)
Expand Down
5 changes: 3 additions & 2 deletions src/app/mainwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <iostream>
#include <fstream>
#include <list>
#include <memory>

std::string moduleExeBaseName( void )
{
Expand Down Expand Up @@ -104,10 +105,10 @@ int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
}
}

HINSTANCE hGetProcIDDLL = LoadLibrary( MAINWIN_DLL );
HINSTANCE hGetProcIDDLL = LoadLibrary( "qgis_app.dll" );
if ( !hGetProcIDDLL )
{
std::cerr << "Could not load the " MAINWIN_DLL << std::endl;
std::cerr << "Could not load the qgis_app.dll" << std::endl;
return EXIT_FAILURE;
}

Expand Down

0 comments on commit 4c92689

Please sign in to comment.