Author Topic: Have a problem with some basic fuctions and referances  (Read 4941 times)

Offline newtocpp

  • Single posting newcomer
  • *
  • Posts: 5
Have a problem with some basic fuctions and referances
« on: February 22, 2019, 01:34:27 pm »
I must have done something wrong about setting up codeblocks?

Any contribiution is apriciated :)

||=== Build: Debug in flush (compiler: GNU GCC Compiler) ===|
obj/Debug/main.o||In function `getConfigValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':|
/home/account/Developer/C++/flush/main.cpp|34|undefined reference to `libconfig::Setting::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'|
obj/Debug/main.o||In function `main':|
/home/account/Developer/C++/flush/main.cpp|68|undefined reference to `XOpenDisplay'|
/home/account/Developer/C++/flush/main.cpp|71|undefined reference to `libconfig::Config::readFile(char const*)'|
/home/account/Developer/C++/flush/main.cpp|80|undefined reference to `XStringToKeysym'|
/home/account/Developer/C++/flush/main.cpp|80|undefined reference to `XKeysymToKeycode'|
/home/account/Developer/C++/flush/main.cpp|187|undefined reference to `XQueryKeymap'|
obj/Debug/main.o||In function `__static_initialization_and_destruction_0(int, int)':|
/home/account/Developer/C++/flush/main.cpp|30|undefined reference to `libconfig::Config::Config()'|
/home/account/Developer/C++/flush/main.cpp|30|undefined reference to `libconfig::Config::~Config()'|
obj/Debug/main.o||In function `libconfig::Config::lookup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':|
/usr/include/libconfig.h++|480|undefined reference to `libconfig::Config::lookup(char const*) const'|
obj/Debug/main.o:(.data.rel.local.DW.ref._ZTIN9libconfig14ParseExceptionE[DW.ref._ZTIN9libconfig14ParseExceptionE]+0x0)||undefined reference to `typeinfo for libconfig::ParseException'|
obj/Debug/main.o:(.data.rel.local.DW.ref._ZTIN9libconfig15FileIOExceptionE[DW.ref._ZTIN9libconfig15FileIOExceptionE]+0x0)||undefined reference to `typeinfo for libconfig::FileIOException'|
obj/Debug/main.o:(.data.rel.local.DW.ref._ZTIN9libconfig24SettingNotFoundExceptionE[DW.ref._ZTIN9libconfig24SettingNotFoundExceptionE]+0x0)||undefined reference to `typeinfo for libconfig::SettingNotFoundException'|
||error: ld returned 1 exit status|
||=== Build failed: 13 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


Thanks for help  :-*


Offline Mistahboom

  • Single posting newcomer
  • *
  • Posts: 2
Re: Have a problem with some basic fuctions and referances
« Reply #2 on: February 24, 2019, 09:23:28 am »
Hi! I'm unsure what the issue is, maybe you need to reinstall? Did you install this version: "codeblocks-17.12mingw-setup.exe"
I understand the importance of more information for a situation like this, you should read the link posted above. It's a small paragraph of reading and should be more efficient in the future.

Otherwise, this article seems related to yours, check it out!
https://stackoverflow.com/questions/20732832/c-hello-world-not-working

Offline newtocpp

  • Single posting newcomer
  • *
  • Posts: 5
Re: Have a problem with some basic fuctions and referances
« Reply #3 on: February 24, 2019, 02:51:46 pm »
Hi! I'm unsure what the issue is, maybe you need to reinstall? Did you install this version: "codeblocks-17.12mingw-setup.exe"
I understand the importance of more information for a situation like this, you should read the link posted above. It's a small paragraph of reading and should be more efficient in the future.

Otherwise, this article seems related to yours, check it out!
https://stackoverflow.com/questions/20732832/c-hello-world-not-working

I am doing all my work in Ubuntu

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Have a problem with some basic fuctions and referances
« Reply #5 on: February 25, 2019, 05:54:15 am »
You have done something wrong setting up your project. These are all linker errors, you dont link the required libraries.