How to fix this error ? undefined reference to `IID_IMultiLanguage'
Hi,
when i try to compile a script using VMime on Windows i have this error :
undefined reference to `IID_IMultiLanguage'
I can't find a libmlang.a nor the library sources in internet.
So how can i fix this ?
Thanks.
Re: How to fix this error ? undefined reference to `IID_IMultiLanguage'
You need to include a header (or other) file that defines IID_IMultiLanguage to be able to compile the code.
To link the code, you also need to link to the library.
So, how do you fix this?
Find the library. If you can't find it, I suggest you contact the people of the website you downloaded the code from.
Re: How to fix this error ? undefined reference to `IID_IMultiLanguage'
I only found the "mlang.h" header file on the mingw/include folder and this don't resolve the problem.
I have also contacted the people of the website i downloaded the code from but still now no response.
Thanks.
Re: How to fix this error ? undefined reference to `IID_IMultiLanguage'
The error you have is a linker error, so your code is compiling OK (the header file is found). I expect this symbol is defined in mlang.dll in your Windows system folder.
What does your PRO file have for LIBS?
Since MingW can sometimes directly link against the DLL (no import library required) I would first try simply adding: or
Code:
LIBS += C:/Windows/system32/mlang.dll
to your PRO file.
Failing that you could try making an import library using the http://msdn.microsoft.com/en-us/libr...08(VS.85).aspx (docs) and http://www.mingw.org/wiki/CreateImportLibraries
Re: How to fix this error ? undefined reference to `IID_IMultiLanguage'
The first solution :
gives me this error : :: error: cannot find -lmlang.
The second solution :
Code:
win32:LIBS += -LC:/Windows/system32/mlang.dll
doesn't change anything.
I also tried to make the import library and it also doesn't succeed . I think that the mlang dll isn't compatible with the dlltool of MinGW.
Quote:
http://www.mingw.org/wiki/CreateImportLibraries
Note also that some dll's may just *not be compatible* -- for example if size differences occur between long long in the different compilers, and you attempt to pass out structs that have long longs. MSVC is known to have different lengths than gcc for long double, some of its versions of it have a difference for size_t, as well (other discrepancies may be lurking, as well).
Or maybe i don't known how to do it.
Note : I succeed to compile this lib (VMime) under Ubuntu.
So can you help me please ?
Re: How to fix this error ? undefined reference to `IID_IMultiLanguage'
Quote:
Originally Posted by
slimittn
The second solution :
Code:
win32:LIBS += -LC:/Windows/system32/mlang.dll
doesn't change anything.
That isn't quite what I wrote, but I expect that what I wrote will not work either.
Code:
// What I wrote explicitly lists the library file full path
win32: LIBS += C:/Windows/system32/mlang.dll
// and you could also try this search path (-L) and lib (-l) variation
win32: LIBS += -LC:/Windows/system32 -lmlang
Quote:
I also tried to make the import library and it also doesn't succeed . I think that the mlang dll isn't compatible with the dlltool of MinGW.
Or maybe i don't known how to do it.
I think the only option is to hand craft a DEF file and make the import library yourself. You'd need the docs for the mlang library (link in my earlier reply) and perserverance. You could start with this:
http://code.google.com/p/win-iconv/s.../mlang.def?r=5
and see how you get on.