Find the answer to your Linux question:
Results 1 to 4 of 4
I am doing migration from GCC 3.4.3 to GCC 4.1.2.While doing that compilation is success after some errors.But while linking, it throws tons to "undefined reference to" errors.I am using ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2

    Migration from GCC3.4.3 to GCC4.1.2


    I am doing migration from GCC 3.4.3 to GCC 4.1.2.While doing that compilation is success after some errors.But while linking, it throws tons to "undefined reference to" errors.I am using libtool as well but the version is 1.5.10.Whether I need to upgrade libtool too? How to solve this problem ("undefined reference to")?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    Quote Originally Posted by ruks View Post
    I am doing migration from GCC 3.4.3 to GCC 4.1.2.While doing that compilation is success after some errors.But while linking, it throws tons to "undefined reference to" errors.I am using libtool as well but the version is 1.5.10.Whether I need to upgrade libtool too? How to solve this problem ("undefined reference to")?
    Some more information as to the actual errors you are getting would be useful. It is possible (likely) that you need to update the entire compiler suite, however.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2
    Errors:

    test_client/client_test/ConfigTest.o: In function `ConfigTest::script_(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ConfigHelper*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    /vobs/test_c/src/test_client/client_test/ConfigTest.cpp:638: undefined reference to `ylmm::basic_parser<action::expression, ylmm::basic_location, 0, ylmm::basic_lock>:arse(void*)'
    test_client/client_test/ConfigTest.o: In function `ConfigTest::commandLine_(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, ConfigHelper*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    /vobs/test_c/src/test_client/client_test/ConfigTest.cpp:593: undefined reference to `ylmm::basic_parser<action::expression, ylmm::basic_location, 0, ylmm::basic_lock>:arse(void*)'

    /vobs/test_c/src/test_client/client_test/Lib++.cpp:2520: undefined reference to `test::Vector<long>::Vector()'
    /vobs/test_c/src/test_client/client_test/Lib++.cpp:2520: undefined reference to `test::Vector<long>::Vector()'
    test_client/client_test/Lib++.o: In function `Libpp::copy(test::Config::AttrValue*, test::Config::FilterLeaf*, test::Config::FilterCmp)':
    /vobs/test_c/src/test_client/client_test/Lib++.cpp:2463: undefined reference to `test::String<wchar_t>::operator=(test::String<wch ar_t> const&)'
    /vobs/test_c/src/test_client/client_test/Lib++.cpp:2464: undefined reference to `test::Vector<test::Config::AttrValue>::size() const'
    /vobs/test_c/src/test_client/client_test/Lib++.cpp:2465: undefined reference to `test::Vector<test::Config::AttrValue>::operator[](unsigned int)'




    what do you mean for "Entire compiler suite" -> Is it autoconf,automake,libtool along with GCC????

    I am not a linux expert.....

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    You should enclose your code and output examples inside a code block so certain combinations of characters don't get interpreted as "smileys"...

    As for "entire suite", I was refering to gcc, ar, ld, gdb, et al. I don't think gmake, autoconf, etc are compiler tools, though they are build tools. Along with the compiler, you will the preprocessor, librarian, linker, and debugger at least to be at the same, or a compatible version, and that should include the system libraries they depend upon, such as libc, amongst others.

    So that brings up the question; how did you update/upgrade the compiler? From source, via a package manager, or what?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •