Pieter Swinkels <swinkels.pieter@...> writes:
> A simple question here about semantic and the STL header files. The
> STL header files do not have an extension, they are simply called
> "vector" or "algorithm" instead of "vector.h" and "algorithm.h". How
> can I let semantic know that it should parse such a file as a C++
> file?
If you system include paths are setup correctly, this should work right
away.
For testing this, create a test C++ file, for example
------------------
#include <vector>
int main(void)
{
std::vector<int> v;
v. // Put cursor behind dot and run M-x semantic-analyze-debug-assist
}
-----------------
Do as the comment says, and it should tell you all kinds of stuff in a
new buffer. If you see there something like
Semantic has found the datatype class vector {}
and its list of members.
then everything should work just fine. If it says that it could not find
the type, then take a look further down at the system include path. It
should include the paths which have the STL header files, for example
/usr/include/c++/4.3/
If it does not contain this path, and you're using gcc, Semantic somehow
failed to parse the includes from your gcc installation. If you're not
using gcc, you have to add the system include paths manually, for
example by using semantic-add-system-include or by creating a project
using EDE.
> I can imagine this question has been asked before, but searching in the
> mailing list archive seems not possible.
You can search the CEDET/Semantic groups at Gmane:
http://search.gmane.org/form.php?group=gmane.emacs.cedet
http://search.gmane.org/form.php?group=gmane.emacs.semantic
Regards,
-David
|