Thanks for the direction Stefan.<br><br>Apologies for the typos. What I was missing was the declaration of the "std::map" prior to my foo declaration. Yes, I agree with you regarding derivation from standard containers. My portion of the project is written in python, I'm trying to work with libraries written by another member of the team. <br>
<br>With the addition of the "std::map" declaration, my compiler errors disappeared.<br><br>Thanks,<br><br>Jeremy<br><br><br><div class="gmail_quote">On Wed, May 6, 2009 at 11:29 AM, Stefan Seefeld <span dir="ltr"><<a href="mailto:seefeld@sympatico.ca">seefeld@sympatico.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Jeremy Kie wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I have the following:<br>
<br>
class foo : public std::map<std::string, std::string> {<br>
}<br>
</blockquote>
<br></div>
You lack a semicolon here. (I also don't think it's a good idea to derive from standard containers, but that is an entirely different subject).<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
BOOST_PYTHON_MODULE(foo_ext)<br>
{<br>
using namespace boost::python;<br>
class_<foo, bases<std::map>>("foo");<br>
</blockquote>
<br></div>
There are three errors here, let's start with the simplest:<br>
<br>
You use '>>' in this line, which is a single token. You need to insert a whitespace there to make it two tokens, e.g. '> >'.<br>
Next, you use 'std::map' where you ought to use a type (such as 'std::map<std::string, std::string>'.<br>
Finally, you only can declare bases that are themselves already exported to python via class_, so you need to start by exporting the base type std::map<std::string, std::string> prior to 'foo'.<br>
<br>
Hope this helps,<br>
Stefan<br><font color="#888888">
<br>
<br>
-- <br>
<br>
...ich hab' noch einen Koffer in Berlin...<br>
<br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org" target="_blank">Cplusplus-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
</font></blockquote></div><br>