Название: xxx::QextSerialPort? Отправлено: fear от Август 07, 2006, 11:21 Сделал следующее:
Код: namespace xxx Увидел это:
Compiling... main.cpp .\main.cpp(3) : error C2014: preprocessor command must start as first nonwhite space d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(99) : error C2027: use of undefined type 'xxx::QByteArray' d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(38) : see declaration of 'xxx::QByteArray' d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(99) : error C2228: left of '.constData' must have class/struct/union d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(99) : error C2027: use of undefined type 'xxx::QByteArray' d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(38) : see declaration of 'xxx::QByteArray' d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qiodevice.h(99) : error C2228: left of '.size' must have class/struct/union d:\lang\qt\4.1.1\include\qtcore\../../src/corelib/io/qfile.h(95) : error C2440: '<function-style-cast>' : cannot convert from 'const char *' to 'xxx::QByteArray' Source or target has incomplete type D:\Lang\Microsoft Visual Studio 8\VC\include\vector(25) : error C2504: '_Ranit' : base class undefined D:\Lang\Microsoft Visual Studio 8\VC\include\vector(260) : see reference to class template instantiation 'xxx::std::_Vector_const_iterator<_Ty,_Alloc>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(25) : error C2143: syntax error : missing ',' before '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(25) : error C2518: keyword 'typename' illegal in base class list; ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(26) : error C2518: keyword 'typename' illegal in base class list; ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(26) : error C2518: keyword 'typename' illegal in base class list; ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(33) : error C2146: syntax error : missing ';' before identifier 'iterator_category' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(40) : error C2146: syntax error : missing ';' before identifier '_Checked_iterator_category' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(40) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(40) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2146: syntax error : missing ')' before identifier '_Ptr' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2146: syntax error : missing ';' before identifier '_Ptr' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2377: 'xxx::std::_Vector_const_iterator<_Ty,_Alloc>::_Tptr' : redefinition; typedef cannot be overloaded with any other symbol D:\Lang\Microsoft Visual Studio 8\VC\include\vector(31) : see declaration of 'xxx::std::_Vector_const_iterator<_Ty,_Alloc>::_Tptr' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2143: syntax error : missing ';' before '*' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2059: syntax error : ')' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(69) : error C2473: '_Pvector' : looks like a function definition, but there is no parameter list. D:\Lang\Microsoft Visual Studio 8\VC\include\vector(71) : error C2059: syntax error : '{' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(71) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body D:\Lang\Microsoft Visual Studio 8\VC\include\vector(72) : error C2059: syntax error : 'this' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(72) : error C2238: unexpected token(s) preceding ';' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(73) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(73) : error C2864: 'xxx::std::_Vector_const_iterator<_Ty,_Alloc>::_Myptr' : only static const integral data members can be initialized within a class D:\Lang\Microsoft Visual Studio 8\VC\include\vector(91) : error C2146: syntax error : missing ';' before identifier 'reference' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C2146: syntax error : missing ')' before identifier '_Ptr' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(392) : see reference to class template instantiation 'xxx::std::_Vector_iterator<_Ty,_Alloc>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C2146: syntax error : missing ';' before identifier '_Ptr' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C2377: 'xxx::std::_Vector_iterator<_Ty,_Alloc>::pointer' : redefinition; typedef cannot be overloaded with any other symbol D:\Lang\Microsoft Visual Studio 8\VC\include\vector(284) : see declaration of 'xxx::std::_Vector_iterator<_Ty,_Alloc>::pointer' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C2143: syntax error : missing ';' before '*' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(306) : error C2059: syntax error : ')' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(307) : error C2065: '_Ptr' : undeclared identifier D:\Lang\Microsoft Visual Studio 8\VC\include\vector(307) : error C2065: '_Pvector' : undeclared identifier D:\Lang\Microsoft Visual Studio 8\VC\include\vector(308) : error C2056: illegal expression D:\Lang\Microsoft Visual Studio 8\VC\include\vector(308) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(308) : error C2473: '_Pvector' : looks like a function definition, but there is no parameter list. D:\Lang\Microsoft Visual Studio 8\VC\include\vector(324) : error C2146: syntax error : missing ';' before identifier 'reference' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(408) : error C2504: '_Container_base' : base class undefined D:\Lang\Microsoft Visual Studio 8\VC\include\vector(419) : see reference to class template instantiation 'xxx::std::_Vector_val<_Ty,_Alloc>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(452) : error C2039: 'reverse_iterator' : is not a member of 'xxx::std' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1246) : see reference to class template instantiation 'xxx::std::vector<_Ty,_Alloc>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(452) : error C2143: syntax error : missing ';' before '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(452) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(452) : error C2238: unexpected token(s) preceding ';' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(453) : error C2039: 'reverse_iterator' : is not a member of 'xxx::std' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(453) : error C2059: syntax error : '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(453) : error C2238: unexpected token(s) preceding ';' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(512) : error C2061: syntax error : identifier '_Int_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(520) : error C2061: syntax error : identifier 'input_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(519) : error C2535: 'void xxx::std::vector<_Ty,_Alloc>::_Construct(_Iter,_Iter)' : member function already defined or declared D:\Lang\Microsoft Visual Studio 8\VC\include\vector(512) : see declaration of 'xxx::std::vector<_Ty,_Alloc>::_Construct' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(673) : error C2146: syntax error : missing ';' before identifier 'rbegin' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(673) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(674) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(676) : warning C4183: 'rbegin': missing return type; assumed to be a member function returning 'int' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(683) : error C2146: syntax error : missing ';' before identifier 'rend' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(683) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(684) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(686) : warning C4183: 'rend': missing return type; assumed to be a member function returning 'int' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(834) : error C2061: syntax error : identifier '_Int_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(840) : error C2061: syntax error : identifier 'input_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(840) : error C2535: 'void xxx::std::vector<_Ty,_Alloc>::_Assign(_Iter,_Iter)' : member function already defined or declared D:\Lang\Microsoft Visual Studio 8\VC\include\vector(834) : see declaration of 'xxx::std::vector<_Ty,_Alloc>::_Assign' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(871) : error C2061: syntax error : identifier '_Int_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(878) : error C2061: syntax error : identifier 'input_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(877) : error C2535: 'void xxx::std::vector<_Ty,_Alloc>::_Insert(xxx::std::_Vector_iterator<_Ty,_Alloc::rebind<_Ty>::other>,_Iter,_Iter)' : member function already defined or declared D:\Lang\Microsoft Visual Studio 8\VC\include\vector(870) : see declaration of 'xxx::std::vector<_Ty,_Alloc>::_Insert' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(886) : error C2061: syntax error : identifier 'forward_iterator_tag' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(885) : error C2535: 'void xxx::std::vector<_Ty,_Alloc>::_Insert(xxx::std::_Vector_iterator<_Ty,_Alloc::rebind<_Ty>::other>,_Iter,_Iter)' : member function already defined or declared D:\Lang\Microsoft Visual Studio 8\VC\include\vector(870) : see declaration of 'xxx::std::vector<_Ty,_Alloc>::_Insert' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1250) : error C2143: syntax error : missing ';' before '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1250) : error C2059: syntax error : '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1250) : error C2065: '_Ty' : undeclared identifier D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1250) : error C2065: '_Ax' : undeclared identifier D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1251) : error C2143: syntax error : missing ';' before '{' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1251) : error C2447: '{' : missing function header (old-style formal list?) D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1323) : error C2504: '_Ranit' : base class undefined D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1410) : see reference to class template instantiation 'xxx::std::_Vb_iter_base<_MycontTy>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1323) : error C2143: syntax error : missing ',' before '<' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1323) : error C2518: keyword 'typename' illegal in base class list; ignored D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1328) : error C2146: syntax error : missing ';' before identifier '_Checked_iterator_category' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1328) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1328) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1498) : error C2146: syntax error : missing ';' before identifier 'iterator_category' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1692) : see reference to class template instantiation 'xxx::std::_Vb_const_iterator<_MycontTy>' being compiled D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1498) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1498) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1499) : error C2146: syntax error : missing ';' before identifier 'value_type' D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1499) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1499) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1809) : error C2065: '_Bool' : undeclared identifier D:\Lang\Microsoft Visual Studio 8\VC\include\vector(2299) : error C2976: 'xxx::std::vector' : too few template arguments D:\Lang\Microsoft Visual Studio 8\VC\include\vector(1246) : see declaration of 'xxx::std::vector' Build log was saved at "file://d:\Lang\MyProjects\C++\QT\test3\test3\Debug\BuildLog.htm" test3 - 93 error(s), 4 warning(s) Почему? Название: xxx::QextSerialPort? Отправлено: Mikhail от Август 07, 2006, 21:22 QextSerialPort написан для Qt3. Отсюда все проблемы и идут.
Название: xxx::QextSerialPort? Отправлено: fear от Август 07, 2006, 22:45 Я использую QextSerialPort 1.0, он под QT4.
добавлено спустя 4 минуты: Поместить QextSerialPort в область имён ххх получилось, избегая попадания туда же деректив #include, пришёл к выводу что так вот в лоб нельзя делать :), а жаль... Название: xxx::QextSerialPort? Отправлено: Mikhail от Август 08, 2006, 07:13 fear.
Вопрос. Откуда взял QextSerialPort 1.0, я пока видел только 0.9 Название: xxx::QextSerialPort? Отправлено: Admin от Август 08, 2006, 07:54 обычно код выглядит так
#include "../QextSerialPort/QextSerialPort.h" using namespace xxx; я правда с QextSerialPort дела не имел но в STL именно так и пользуется Название: xxx::QextSerialPort? Отправлено: fear от Август 08, 2006, 16:00 Цитата: "Mikhail" fear. Вопрос. Откуда взял QextSerialPort 1.0, я пока видел только 0.9 http://qextserialport.sourceforge.net/ |