Skip to content

Commit

Permalink
Set path to find Qt plugins on Windows
Browse files Browse the repository at this point in the history
git-svn-id: file:///Volumes/GecodeGitMigration/gecode-svn-mirror/gecode/tags/release-4.4.0@14952 e85b7adc-8362-4630-8c63-7469d557c915
  • Loading branch information
Christian Schulte committed Apr 12, 2016
1 parent a4e4f35 commit 56148d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gecode/gist/gist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*
*/

#include <cstdlib>
#include <QtGui>

#include <gecode/gist.hh>
Expand Down Expand Up @@ -103,9 +104,25 @@ namespace Gecode { namespace Gist {

int
explore(Space* root, bool bab, const Options& opt) {

#ifdef _MSC_VER
// Set the plugin search path on Windows when in default installation
if (char* gd = getenv("GECODEDIR")) {
unsigned int gdl = static_cast<unsigned int>(strlen(gd) + 32U);
char* gdb = heap.alloc<char>(gdl);
strcpy(gdb, gd);
strcat(gdb, "/bin/");
QCoreApplication::addLibraryPath(gdb);
heap.free(gdb,gdl);
}
#endif

char argv0='\0'; char* argv1=&argv0;
int argc=0;


QApplication app(argc, &argv1);

GistMainWindow mw(root, bab, opt);
return app.exec();
}
Expand Down

0 comments on commit 56148d9

Please sign in to comment.