Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » unresolved inclusion <vector>
unresolved inclusion <vector> [message #644900] Tue, 14 December 2010 11:40 Go to next message
Eclipse UserFriend
Hi,

I've installed Eclipse CDT plugin v7.0.1.2 and the Mingw compiler. I've tried the helloworld ANSI C project and that works fine. However when I try to run a program that has:
#include <cmath>
#include <vector>

I get unresolved inclusion errors for <cmath> and <vector>. The other includes are fine (e.g. #include <stdio.h>).

In paths & symbols, the following are featured in the include tab:
C:/MinGW/lib/gcc/mingw32/4.5.0/include-fixed
C:/MinGW/lib/gcc/mingw32/4.5.0/include
C:/MinGW/include


I've searched the web and figured out that vector etc comes from the Standard Template Library. But this sounds like something that I should have by default, or do I have to download this separately and point to it?

Cheers for the help
D
Re: unresolved inclusion <vector> [message #645141 is a reply to message #644900] Wed, 15 December 2010 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Standard Template Library is only available in C++. You must convert your source file to C++, i.e. rename it to *.cpp.
Re: unresolved inclusion <vector> [message #735385 is a reply to message #644900] Tue, 11 October 2011 12:13 Go to previous message
Eclipse UserFriend

Try to delete everything but what is in the main folder and compile again. It worked for me.
Previous Topic:DecoratingStyledCellLabelProvider for Project Explorer?
Next Topic:Repercussions of "make -j4"
Goto Forum:
  


Current Time: Mon Jul 14 02:52:03 EDT 2025

Powered by FUDForum. Page generated in 0.07837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top