author | zautrix <zautrix> | 2004-07-08 00:16:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-08 00:16:46 (UTC) |
commit | e8628e6e3e98f2276fb69bbc545866cc9a022228 (patch) (side-by-side diff) | |
tree | 798f61100c1ec3dab71a00ba63ac0d99fbd643b1 /microkde | |
parent | 5030b0bd32b1e526f28ce0339d4b4854492393ae (diff) | |
download | kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.zip kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.gz kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.bz2 |
Compile fixes for windows
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index 9eee912..1394154 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp @@ -369,39 +369,46 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta // only append ".la" if there is no extension // this allows to load non-libtool libraries as well // (mhk, 20000228) int pos = libname.findRev('/'); if (pos < 0) pos = 0; /*US if (libname.find('.', pos) < 0) { libname += ".la"; } */ //US in the microedition we work only with shared libraries. + if (libname.find('.', pos) < 0) { +#ifdef _WIN32_ + libname += ".dll"; +#else libname += ".so"; +#endif } // only look up the file if it is not an absolute filename // (mhk, 20000228) QString libfile; if (libname[0] == '/') libfile = libname; else { //US at this point the libname must exist as real filesname. No expansions will be made later // in findResources. Because of that we prepend the lib prefix here to the name //US I add also the "lib" prefix. I do not how could this could have worked before without it? +#ifndef _WIN32_ libname.insert(pos, "lib"); +#endif //US libfile = instance->dirs()->findResource( "module", libname ); //qDebug("libname = %s ",libname.data() ); libfile = KGlobal::dirs()->findResource( "module", libname ); //qDebug("libfile = %s ",libfile.latin1() ); if ( libfile.isEmpty() ) { //US libfile = instance->dirs()->findResource( "lib", libname ); libfile = KGlobal::dirs()->findResource( "lib", libname ); //qDebug("libfile2 = %s ",libfile.latin1() ); |