On Sun, Feb 21, 2010 at 02:27:49PM +0100, Uwe Stöhr wrote:

> Am 21.02.2010 05:59, schrieb LyX Ticket Tracker:
> 
> >#5238: LyX 1.6 fails with non-ascii chars in path (on Windows)
> >
> >  Fixed in trunk at r33524.
> 
> This breaks the compilation. I now get this error:
> 
> Creating library release\lyx.lib and object release\lyx.exp
> support.lib(os.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class QString __cdecl
> QString::fromWCharArray(wchar_t const *,int)"
> (__imp_?fromwcharar...@qstring@@sa?...@pb_wh@Z) referenced in
> function "class QString const __cdecl
> lyx::support::os::get_long_path(class QString const &)"
> (?get_long_p...@os@supp...@lyx@@YA?BVQString@@ABV4@@Z)
> release\lyx.exe : fatal error LNK1120: 1 unresolved externals
> scons: *** [release\lyx.exe] Error 1120
> 
> CAn you please have a look?

It compiles fine with MinGW. However, I get a different error when the
NewAPIs.h include is available. Does the attached patch solve the problem
for you?

-- 
Enrico
Index: src/support/os_win32.cpp
===================================================================
--- src/support/os_win32.cpp    (revisione 33526)
+++ src/support/os_win32.cpp    (copia locale)
@@ -32,25 +32,6 @@
 
 #include <QString>
 
-/* The GetLongPathName macro may be defined on the compiling machine,
- * but we must use a bit of trickery if the resulting executable is
- * to run on a Win95 machine.
- * Fortunately, Microsoft provide the trickery. All we need is the
- * NewAPIs.h header file, available for download from Microsoft as
- * part of the Platform SDK.
- */
-#if defined (HAVE_NEWAPIS_H)
-// This should be defined already to keep Boost.Filesystem happy.
-# if !defined (WANT_GETFILEATTRIBUTESEX_WRAPPER)
-#   error Expected WANT_GETFILEATTRIBUTESEX_WRAPPER to be defined!
-# endif
-# define WANT_GETLONGPATHNAME_WRAPPER 1
-# define COMPILE_NEWAPIS_STUBS
-# include <NewAPIs.h>
-# undef COMPILE_NEWAPIS_STUBS
-# undef WANT_GETLONGPATHNAME_WRAPPER
-#endif
-
 #include <io.h>
 #include <direct.h> // _getdrive
 #include <shlobj.h>  // SHGetFolderPath

Reply via email to