Abdelrazak Younes wrote:
Abdelrazak Younes wrote:
Dear Windows-based developers,

I had the occasion to use LyX on Linux and I noticed that loading files is quicker there. I think the culprit is the GnuWin32 iconv library and I stumbled across this:

http://groups.google.com/group/vim_multibyte/browse_thread/thread/758d3b013d2cf99a

This is already used by GTK on Windows so I guess we could try to use it. I prepared a patch for this but unfortunately it does not link (using my attempt to modify CMake).

Here is the link error in case someone is interested:

------ Build started: Project: tex2lyx, Configuration: Debug Win32 ------
Linking...
support.lib(unicode.obj) : error LNK2019: unresolved external symbol "int __cdecl iconv_close(void *)" (?iconv_close@@[EMAIL PROTECTED]) referenced in function "public: int __thiscall lyx::IconvProcessor::convert(char const *,unsigned int,char *,unsigned int)" ([EMAIL PROTECTED]@lyx@@[EMAIL PROTECTED]) support.lib(unicode.obj) : error LNK2019: unresolved external symbol "void * __cdecl iconv_open(char const *,char const *)" (?iconv_open@@[EMAIL PROTECTED]) referenced in function "private: bool __thiscall lyx::IconvProcessor::init(void)" ([EMAIL PROTECTED]@lyx@@AAE_NXZ) support.lib(unicode.obj) : error LNK2019: unresolved external symbol "unsigned int __cdecl iconv(void *,char const * *,unsigned int *,char * *,unsigned int *)" (?iconv@@[EMAIL PROTECTED]) referenced in function "public: int __thiscall lyx::IconvProcessor::convert(char const *,unsigned int,char *,unsigned int)" ([EMAIL PROTECTED]@lyx@@[EMAIL PROTECTED]) D:\devel\lyx\trunk\development\cmake\bin\Debug\tex2lyx.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://d:\devel\lyx\trunk\development\cmake\src\tex2lyx\tex2lyx.dir\Debug\BuildLog.htm"
tex2lyx - 4 error(s), 0 warning(s)
------ Build started: Project: lyx, Configuration: Debug Win32 ------
Linking...
support.lib(docstream.obj) : error LNK2019: unresolved external symbol "void * __cdecl iconv_open(char const *,char const *)" (?iconv_open@@[EMAIL PROTECTED]) referenced in function "public: __thiscall `anonymous namespace'::iconv_codecvt_facet::iconv_codecvt_facet(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,unsigned int)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED]) support.lib(unicode.obj) : error LNK2001: unresolved external symbol "void * __cdecl iconv_open(char const *,char const *)" (?iconv_open@@[EMAIL PROTECTED]) support.lib(docstream.obj) : error LNK2019: unresolved external symbol "unsigned int __cdecl iconv(void *,char const * *,unsigned int *,char * *,unsigned int *)" (?iconv@@[EMAIL PROTECTED]) referenced in function "private: int __thiscall `anonymous namespace'::iconv_codecvt_facet::do_iconv(void *,char const * *,unsigned int *,char * *,unsigned int *)const " ([EMAIL PROTECTED]@?A0x5ecfc641@@[EMAIL PROTECTED]) support.lib(unicode.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl iconv(void *,char const * *,unsigned int *,char * *,unsigned int *)" (?iconv@@[EMAIL PROTECTED]) support.lib(docstream.obj) : error LNK2019: unresolved external symbol "int __cdecl iconv_close(void *)" (?iconv_close@@[EMAIL PROTECTED]) referenced in function "protected: virtual __thiscall `anonymous namespace'::iconv_codecvt_facet::~iconv_codecvt_facet(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) support.lib(unicode.obj) : error LNK2001: unresolved external symbol "int __cdecl iconv_close(void *)" (?iconv_close@@[EMAIL PROTECTED]) D:\devel\lyx\trunk\development\cmake\bin\Debug\lyx.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://d:\devel\lyx\trunk\development\cmake\src\lyx.dir\Debug\BuildLog.htm"
lyx - 7 error(s), 0 warning(s)
------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
Project not selected to build for this solution configuration
========== Build: 1 succeeded, 2 failed, 10 up-to-date, 1 skipped ==========


include iconv.h  as extern "C" or rename the file to cpp, then it is compiled as
C++ and not C only.

--
Peter Kümmel

Reply via email to