Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:11:52+00:00 2026-05-27T18:11:52+00:00

I was compiling some c++ program where i have used push_back function. At the

  • 0

I was compiling some c++ program where i have used push_back function. At the end I am getting this error:

/usr/include/c++/4.4/bits/stl_vector.h:741: undefined reference to `std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::**_M_insert_aux**(__gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

In file stl_vector.h you will find _M_insert_aux but i couldn’t find its definition.

Please suggest to me how to overcome this problem.

Code snippet:

for (table=lex->query_tables; table; table=table->next_global)
{
    string table_db=table->db;
    table_db += ":";
    table_db= table_db+table->table_name;
    current.tables.push_back(table_db);
    DBUG_PRINT("Dip", (" %s: %s, %s",table->db, table->table_name, table->alias));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:11:53+00:00Added an answer on May 27, 2026 at 6:11 pm

    I reproduced this compiler error with the following (main.cpp):

    #include <vector>
    #include <string>
    
    int main()
    {
        std::vector<std::string> v;
        v.push_back(std::string("test"));
        return 0;
    }
    

    Compiler command:

    g++ -fno-implicit-templates main.cpp -o main
    

    It compiles if -fno-implicit-templates option is not specified.

    Check if the compiler flag -fno-implicit-templates is being specified and remove it if possible.

    To build with -fno-implicit-templates I changed the source to:

    #include <vector>
    #include <string>
    
    //class template std::vector<std::string>; TYPO here: 'class' & 'template' wrong order 
    template class std::vector<std::string>;
    
    int main()
    {
        std::vector<std::string> v;
        v.push_back(std::string("test"));
        return 0;
    }
    

    EDIT:

    I downloaded mysql 5.1.60 and built it successfully using the configure and make commands you provided in the comment.

    I then edited the file “sql_parse.cc” as follows:

    // Added these include directives before any other.
    #include <vector>
    #include <string>
    
    // At the end of include directives added this explicit template
    // instantiation.
    template class std::vector<std::string>;
    
    // Added the following lines into a random function.
    std::vector<std::string> v;
    v.push_back(std::string("1"));
    

    I then ran make again and it compiled and linked successfully.
    Note I compiled with -fno-implicit-templates: I made no other change to the mysql distribution apart from the ones I made to “sql_parse.cc”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having some difficulty compiling a C++ program that I've written. This program
I have a problem with some JNI code. I'm getting the following error printed
Greetings, SO. I have some code which I've made attempts at compiling using gcc,
I have a program for some scientific simulation stuff, and as such needs to
I have some GLSL shaders that are compiling correctly, and being successfully attached to
I have recently discovered an annoying problem in some large program i am developing;
I'd like to have some variables set to different values depending if I'm compiling
I have some basic knowledge about compiling C but need to get a couple
We have a C# program that performs some timing measurements. Unfortunately, the first time
when compiling some projects on linux terminal, I get usually a long output consisting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.