Page 1 of 1

undefined reference to `libintl_sprintf'

Posted: Thu Feb 02, 2012 5:16 am
by jiapei100
Hi, Eran:


I always met the following error message when building codes under CodeLite.
undefined reference to `libintl_sprintf'
BTW, this never happens when using Visual Studio.
Any suggestions?


Pei

Re: undefined reference to `libintl_sprintf'

Posted: Fri Feb 03, 2012 1:03 pm
by eranif
In the compiler that comes with codelite (GCC TDM 4.6.1) libintl is missing from the lib directory.

Luckily, MinGW is willing to link against DLL as if it were library

To fix this:

Code: Select all

copy /path/to/MinGW/bin/libintl-8.dll to/path/to/MinGW/lib/libintl.dll
In codelite make sure you are linking against:

Code: Select all

intl
Eran

Re: undefined reference to `libintl_sprintf'

Posted: Fri Feb 03, 2012 10:10 pm
by jiapei100
I'm using Ubuntu... ^_^
eranif wrote:In the compiler that comes with codelite (GCC TDM 4.6.1) libintl is missing from the lib directory.

Luckily, MinGW is willing to link against DLL as if it were library

To fix this:

Code: Select all

copy /path/to/MinGW/bin/libintl-8.dll to/path/to/MinGW/lib/libintl.dll
In codelite make sure you are linking against:

Code: Select all

intl
Eran

Re: undefined reference to `libintl_sprintf'

Posted: Fri Feb 03, 2012 11:54 pm
by eranif
jiapei100 wrote:I'm using Ubuntu... ^_^
Remember to mention it next time...

However, the solution is still the same, you need link with libintl

Eran

Re: undefined reference to `libintl_sprintf'

Posted: Sat Feb 04, 2012 1:06 am
by jiapei100
However, the strange thing is:
In exactly the same workspace, to build other projects also with "printf", I'd never specify libintl, but they work fine !!

Only for this specific project, it fails....


Pei