Hi,
together with Christian I could resolve the earlier linking errors, however
I'm facing another one that just makes me scratch my head :)
,----
| [ 0%] Built target kdev_includepathresolver
| [ 0%] Built target kdev4cpprpp_automoc
| [ 13%] Built target kdev4cpprpp
| [ 13%] Built target kdev4cppparser_automoc
| [ 31%] Built target kdev4cppparser
| [ 31%] Built target kdev4cppduchain_automoc
| [ 68%] Built target kdev4cppduchain
| [ 68%] Built target veritascpp_automoc
| [ 81%] Built target veritascpp
| [ 81%] Built target kdevcpplanguagesupport_automoc
| Linking CXX shared module ..\..\bin\kdevcpplanguagesupport.dll
| Creating library ..\..\bin\kdevcpplanguagesupport.lib and object
..\..\bin\kdevcpplanguagesupport.exp
| quickopen.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class KDevVarLengthArray<class
KDevelop::ImportTraceItem,40> __thiscall
KDevelop::TopDUContext::importTrace(class KDevelop::TopDUContext const *)const
" ([EMAIL PROTECTED]@KDevelop@@[EMAIL PROTECTED]@KDevelop@@$0CI@@@PBV12@@Z)
referenced in function "public: virtual class QWidget * __thiscall
IncludeFileData::expandingWidget(void)const " ([EMAIL
PROTECTED]@@UBEPAVQWidget@@XZ)
| ..\..\bin\kdevcpplanguagesupport.dll : fatal error LNK1120: 1 unresolved
externals
| LINK Pass 1 failed. with 1120
`----
If you want to reproduce you need to apply the attached patch, which I
haven't comitted yet because I'm waiting for approval from the author of
the code.
Anybody an idea? The class is properly exported and is not a template.
TopDUContext is at
http://websvn.kde.org/trunk/KDE/kdevplatform/language/duchain/topducontext.h
The code using it is here:
http://websvn.kde.org/trunk/KDE/kdevelop/languages/cpp/quickopen.cpp
Andreas
--
You have an ability to sense and know higher truth.
Index: languages/cpp/cppduchain/contextbuilder.cpp
===================================================================
--- languages/cpp/cppduchain/contextbuilder.cpp (revision 866056)
+++ languages/cpp/cppduchain/contextbuilder.cpp (working copy)
@@ -27,7 +27,6 @@
#include <language/duchain/duchain.h>
#include <language/duchain/topducontext.h>
-#include <language/duchain/duchainlock.h>
#include <language/duchain/declaration.h>
#include <language/duchain/use.h>
#include <language/duchain/smartconverter.h>
@@ -45,7 +44,6 @@
#include "rpp/chartools.h"
#include <language/duchain/dumpchain.h>
#include "tokens.h"
-#include "classdeclaration.h"
using namespace KTextEditor;
using namespace KDevelop;
@@ -448,22 +446,6 @@
closeContext();
}
-void ContextBuilder::addBaseType( Cpp::BaseClassInstance base ) {
- DUChainWriteLocker lock(DUChain::lock());
-
- addImportedContexts(); //Make sure the template-contexts are imported first, before any parent-class contexts.
-
- Q_ASSERT(currentContext()->type() == DUContext::Class);
- AbstractType::Ptr baseClass = base.baseClass.type();
- IdentifiedType* idType = dynamic_cast<IdentifiedType*>(baseClass.unsafeData());
- Declaration* idDecl = 0;
- if( idType && (idDecl = idType->declaration(currentContext()->topContext())) && idDecl->logicalInternalContext(0) ) {
- currentContext()->addImportedParentContext( idDecl->logicalInternalContext(0) );
- } else if( !baseClass.cast<DelayedType>() ) {
- kDebug(9007) << "ContextBuilder::addBaseType: Got invalid base-class" << (base.baseClass ? base.baseClass.type()->toString() : QString());
- }
-}
-
void ContextBuilder::visitEnumSpecifier(EnumSpecifierAST* node)
{
//The created context must be unnamed, so the enumerators can be found globally with the correct scope
Index: languages/cpp/cppduchain/contextbuilder.h
===================================================================
--- languages/cpp/cppduchain/contextbuilder.h (revision 866056)
+++ languages/cpp/cppduchain/contextbuilder.h (working copy)
@@ -29,11 +29,13 @@
#include <language/duchain/builders/abstractcontextbuilder.h>
#include <language/duchain/duchainpointer.h>
+#include <language/duchain/duchainlock.h>
#include <language/duchain/identifier.h>
#include <language/duchain/ducontext.h>
#include <ksharedptr.h>
#include "cppduchainexport.h"
#include "cppeditorintegrator.h"
+#include "classdeclaration.h"
//Uncomment this to debug what happens to context ranges when new ones are inserted
//#define DEBUG_CONTEXT_RANGES
@@ -146,8 +148,22 @@
*/
KDevelop::QualifiedIdentifier identifierForNode(NameAST* id, TypeSpecifierAST** typeSpecifier);
- virtual void addBaseType( Cpp::BaseClassInstance base );
+ virtual void addBaseType( Cpp::BaseClassInstance base ) {
+ DUChainWriteLocker lock(DUChain::lock());
+ addImportedContexts(); //Make sure the template-contexts are imported first, before any parent-class contexts.
+
+ Q_ASSERT(currentContext()->type() == DUContext::Class);
+ AbstractType::Ptr baseClass = base.baseClass.type();
+ IdentifiedType* idType = dynamic_cast<IdentifiedType*>(baseClass.unsafeData());
+ Declaration* idDecl = 0;
+ if( idType && (idDecl = idType->declaration(currentContext()->topContext())) && idDecl->logicalInternalContext(0) ) {
+ currentContext()->addImportedParentContext( idDecl->logicalInternalContext(0) );
+ } else if( !baseClass.cast<DelayedType>() ) {
+ kDebug(9007) << "ContextBuilder::addBaseType: Got invalid base-class" << (base.baseClass ? base.baseClass.type()->toString() : QString());
+ }
+ }
+
///Open/close prefix contexts around the class specifier that make the qualified identifier
///of the class Declaration match, because Declarations have only unqualified names.
///@param id should be the whole identifier. A prefix-context will only be created if it
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows