CodeLite installation/troubleshooting forum
jiapei100
CodeLite Expert
Posts: 115 Joined: Wed Dec 30, 2009 8:29 am
Genuine User: Yes
IDE Question: C++
Location: Surrey, BC, Canada
Contact:
Post
by jiapei100 » Thu Feb 02, 2012 5:16 am
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
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Fri Feb 03, 2012 1:03 pm
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:
Eran
jiapei100
CodeLite Expert
Posts: 115 Joined: Wed Dec 30, 2009 8:29 am
Genuine User: Yes
IDE Question: C++
Location: Surrey, BC, Canada
Contact:
Post
by jiapei100 » Fri Feb 03, 2012 10:10 pm
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:
Eran
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Fri Feb 03, 2012 11:54 pm
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
jiapei100
CodeLite Expert
Posts: 115 Joined: Wed Dec 30, 2009 8:29 am
Genuine User: Yes
IDE Question: C++
Location: Surrey, BC, Canada
Contact:
Post
by jiapei100 » Sat Feb 04, 2012 1:06 am
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