Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I reproduced this compiler error with the following (<code>main.cpp</code>):</p> <pre><code>#include &lt;vector&gt; #include &lt;string&gt; int main() { std::vector&lt;std::string&gt; v; v.push_back(std::string("test")); return 0; } </code></pre> <p>Compiler command:</p> <pre><code>g++ -fno-implicit-templates main.cpp -o main </code></pre> <p>It compiles if <code>-fno-implicit-templates</code> option is not specified.</p> <p>Check if the compiler flag <code>-fno-implicit-templates</code> is being specified and remove it if possible.</p> <p>To build with <code>-fno-implicit-templates</code> I changed the source to:</p> <pre><code>#include &lt;vector&gt; #include &lt;string&gt; //class template std::vector&lt;std::string&gt;; TYPO here: 'class' &amp; 'template' wrong order template class std::vector&lt;std::string&gt;; int main() { std::vector&lt;std::string&gt; v; v.push_back(std::string("test")); return 0; } </code></pre> <p>EDIT:</p> <p>I downloaded mysql 5.1.60 and built it successfully using the <code>configure</code> and <code>make</code> commands you provided in the comment.</p> <p>I then edited the file "sql_parse.cc" as follows:</p> <pre><code>// Added these include directives before any other. #include &lt;vector&gt; #include &lt;string&gt; // At the end of include directives added this explicit template // instantiation. template class std::vector&lt;std::string&gt;; // Added the following lines into a random function. std::vector&lt;std::string&gt; v; v.push_back(std::string("1")); </code></pre> <p>I then ran <code>make</code> again and it compiled and linked successfully. Note I compiled with <code>-fno-implicit-templates</code>: I made no other change to the mysql distribution apart from the ones I made to "sql_parse.cc".</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload