undefined references

Hi,

I'm attempting to compile some code but keep coming up with same error messages:

main.cpp:29: error: undefined reference to `ki18n(char const*)'
main.cpp:33: error: undefined reference to `KLocalizedString::~KLocalizedString()'

Now, I think this is caused by not linking in the right library. But I'm
unsure of which libraries I need to link.
Any ideas ?

I'm running Linux Mint 18 and I'm using the QTCreator IDE.

Thanks

FC.
You apparently call function ki18n() and use class KLocalizedString.

Since the compiler did not have issues with that, you must have included their definitions. Which header defines them? What package does that header file belong to? Does that package contain a library too?

('man ki18n' might give you a manual of the function. That could help on the search.)

The 'k'-prefix on names is typical for KDE.
You are right -- you must link with KI18n (-lKI18n). Make sure to add it to your project options.
Topic archived. No new replies allowed.