On 07/19/2012 11:12 PM, David C. Rankin wrote:
On 07/17/2012 01:25 PM, Nix wrote:
On 17 Jul 2012, David C. Rankin outgrape:
--- kima/src/kima.h
+++ kima/src/kima.h 2012-07-17 00:44:44.835910307 -0500
@@ -35,6 +35,9 @@
#include <tqptrlist.h>
#include <tqlabel.h>
+// Namespace
+using namespace std;
+
That's not going to help: the list below on line 177 is already
namespace-qualified with std::.
What is wrong with private declaration:
'void addSources(const std::list<Source*>& inList);'
(line 177 kima.h) see:
http://www.3111skyline.com/dl/dt/tde/err/kima/kima.h.txt
That is the line causing the error:
In file included from kima.moc.cpp:9:0:
./kima.h:179:24: error: 'list' in namespace 'std' does not name a type
./kima.h:179:29: warning: ISO C++ forbids declaration of 'parameter' with no
type [-fpermissive]
./kima.h:179:33: error: expected ',' or '...' before '<'
token
This has nothing to do with the information turned up from searching: "error:
'list' in namespace 'std' does not name a type" e.g.:
http://www.cplusplus.com/forum/beginner/51696/ or any of the others turned up.
It's like a round-peg error looking for a square-hole to fit in.
It seems like this is just generated out of thin air. The namespace is correct,
the declaration is std:: qualified, I can't find any standard it violates. It is
like this is some implicit declaration problem that just shouldn't exist, or
like gcc no longer knows what a STL list is.
c++ gurus -- what is your take -- it still won't build :(
OK,
I took the error literally and did:
void addSources(const std::list...<Source*>& inList);
The error then changed quite a bit. Does this shed any more light on the
problem (other than the monkey behind the keyboard)?
In file included from kima.cpp:51:0:
kima.h:177:24: error: invalid use of template-name 'std::list' without an
argument list
kima.h:177:33: error: ISO C++ forbids declaration of 'parameter' with no type
[-fpermissive]
kima.h:177:36: error: expected ')' before '<' token
kima.h:177:33: error: expected ';' at end of member declaration
kima.h:177:36: error: expected unqualified-id before '<' token
kima.cpp: In constructor 'Kima::Kima(const TQString&, KPanelApplet::Type, int,
TQWidget*, const char*)':
kima.cpp:108:52: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:108:52: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:109:53: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:109:53: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:110:53: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:110:53: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:111:49: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:111:49: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:112:47: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:112:47: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:113:54: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:113:54: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:114:53: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:114:53: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:115:51: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:115:51: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:116:46: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:116:46: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:117:50: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:117:50: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:118:42: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:118:42: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:119:46: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:119:46: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:120:47: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:120:47: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:121:45: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:121:45: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp:122:46: error: no matching function for call to
'Kima::addSources(std::list<Source*>)'
kima.cpp:122:46: note: candidate is:
In file included from kima.cpp:51:0:
kima.h:177:7: note: void Kima::addSources(int, ...)
kima.h:177:7: note: no known conversion for argument 1 from
'std::list<Source*>' to 'int'
kima.cpp: At global scope:
kima.cpp:159:6: error: prototype for 'void Kima::addSources(const
std::list<Source*>&)' does not match any in class 'Kima'
In file included from kima.cpp:51:0:
kima.h:177:7: error: candidate is: void Kima::addSources(int, ...)
kima.cpp:346:6: warning: unused parameter 'inEvent' [-Wunused-parameter]
--
David C. Rankin, J.D.,P.E.