List Info

Thread: Problems building duchain on win32




Problems building duchain on win32
user name
2008-03-28 14:25:01
Hi,

an interested user just posted the following problem on irc.
I couldn't
find duplicate declaration or definition of the function in
question.
Could this be a bug in MinGW compiler?

On a side note: Is there a reason for the export macro on
line 629 in
templatedeclaration.cpp? ccp support builds without it and
the symbol
isn't used outside as its inside a .cpp.

C:kderootsvntrunkKDEkdeveloplanguagescppcppduchainn
avigationwidget.cpp:618: warning: cast f
rom pointer to integer of different size
[ 31%] Building CXX object
languages/cpp/cppduchain/CMakeFiles/kdev4cppduchain.dir/name
_visitor.obj
In file included from
c:/kderoot/include/kdevplatform/language/duchain/duchainbase
.h:23,
                 from
c:/kderoot/include/kdevplatform/language/duchain/ducontext.h
:27,
                 from
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchainc
ppducontext.h:57,
                 from
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchainn
ame_visitor.h:26,
                 from
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchainn
ame_visitor.cpp:22
:
c:/kderoot/include/kdevplatform/editor/hashedstring.h:82:
warning: inline function `uint KDevelop::q
Hash(const KDevelop::HashedString&)' declared as
dllimport: attribute ignored
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchainn
ame_visitor.cpp:77:2: warning: #warning
"NameASTVisitor::visitUnqualifiedName() -- implement
me"
[ 31%] Building CXX object
languages/cpp/cppduchain/CMakeFiles/kdev4cppduchain.dir/type
_visitor.obj
In file included from
c:/kderoot/include/kdevplatform/language/duchain/duchainbase
.h:23,
                 from
c:/kderoot/include/kdevplatform/language/duchain/ducontext.h
:27,
                 from
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchaint
ype_visitor.h:31,
                 from
C:kderootsvntrunkKDEkdeveloplanguagescppcppduchaint
ype_visitor.cpp:20
:
c:/kderoot/include/kdevplatform/editor/hashedstring.h:82:
warning: inline function `uint KDevelop::q
Hash(const KDevelop::HashedString&)' declared as
dllimport: attribute ignored
Linking CXX shared library
../../../bin/libkdev4cppduchain.dll
Creating library file:
../../../bin/libkdev4cppduchain.dll.a
CMakeFiles/kdev4cppduchain.dir/templatedeclaration.obj: In
function `_ZNK3Cpp26SpecialTemplateDeclar
ationIN8KDevelop18ForwardDeclarationEE7resolveEPKNS1_12TopDU
ContextE':
C:/kderoot/svn/trunk/KDE/kdevelop/languages/cpp/cppduchain/t
emplatedeclaration.cpp:629: multiple def
inition of
`Cpp::SpecialTemplateDeclaration<KDevelop::ForwardDeclara
tion>::resolve(KDevelop::TopDUCo
ntext const*) const'
CMakeFiles/kdev4cppduchain.dir/declarationbuilder.obj:C:/kde
root/svn/trunk/KDE/kdevelop/languages/cp
p/cppduchain/declarationbuilder.cpp:(.text$_ZNK3Cpp26Special
TemplateDeclarationIN8KDevelop18ForwardD
eclarationEE7resolveEPKNS1_12TopDUContextE[Cpp::SpecialTempl
ateDeclaration<KDevelop::ForwardDeclarat
ion>::resolve(KDevelop::TopDUContext const*) const]+0x0):
first defined here
collect2: ld returned 1 exit status
mingw32-make[2]: *** [bin/libkdev4cppduchain.dll] Error 1
mingw32-make[1]: ***
[languages/cpp/cppduchain/CMakeFiles/kdev4cppduchain.dir/all
] Error 2
mingw32-make: *** [all] Error 2
emerge fatal error: while Make'ing. cmd: mingw32-make
emerge fatal error: running python
c:kderootemergeportagetestingkdevelopkdevelop-3.97.200
71224
.py compile
emerge error: fatal error: package
testing/kdevelop-3.97.20071224 all failed

Andreas

-- 
Exercise caution in your daily affairs.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Problems building duchain on win32
user name
2008-03-28 16:02:30
On Friday 28 March 2008 20:25:01 Andreas Pakulat wrote:
> On a side note: Is there a reason for the export macro
on line 629 in
> templatedeclaration.cpp? ccp support builds without it
and the symbol
> isn't used outside as its inside a .cpp.

I think it was needed, because else the template-declaration
isn't exported, 
and isn't called when the virtual function is used from
within kdevplatform. 
I'm not sure though, but I think there was such a problem.

> an interested user just posted the following problem on
irc. I couldn't
> find duplicate declaration or definition of the
function in question.
> Could this be a bug in MinGW compiler?

Hmm I don't know, I'm not an expert about the whole
"export" and plugin/dll 
stuff. Maybe it should be a simple "export" there,
not a 
KDEVCPPDUCHAIN_EXPORT.

Greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Problems building duchain on win32
user name
2008-03-28 16:42:51
On 28.03.08 22:02:30, David Nolden wrote:
> On Friday 28 March 2008 20:25:01 Andreas Pakulat
wrote:
> > On a side note: Is there a reason for the export
macro on line 629 in
> > templatedeclaration.cpp? ccp support builds
without it and the symbol
> > isn't used outside as its inside a .cpp.
> 
> I think it was needed, because else the
template-declaration isn't exported, 
> and isn't called when the virtual function is used from
within kdevplatform. 
> I'm not sure though, but I think there was such a
problem.

Interesting, yes that does make some sense as the function
is not
visible outside the library... Can you put the function into
the header?

> > an interested user just posted the following
problem on irc. I couldn't
> > find duplicate declaration or definition of the
function in question.
> > Could this be a bug in MinGW compiler?
> 
> Hmm I don't know, I'm not an expert about the whole
"export" and plugin/dll 
> stuff. Maybe it should be a simple "export"
there, not a 
> KDEVCPPDUCHAIN_EXPORT.

those export macro's evaluate to declspec(dllimport) when
the file is
#included in a c++ file outside the same library and they
evaluate to
declspec(dllexport) in the case that the file is included or
compiled in
the library it belongs to. 

The question is why mingw thinks the function is defined
twice.  And I
really have no good idea either :(

Andreas

-- 
You may get an opportunity for advancement today.  Watch
it!

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Problems building duchain on win32
user name
2008-03-28 17:01:53
On Friday 28 March 2008 22:42:51 Andreas Pakulat wrote:
> Interesting, yes that does make some sense as the
function is not
> visible outside the library... Can you put the function
into the header?

That would be the moment that mingw would be right in saying
"was defined 
multiple times", because it would be defined in every
file that includes 
templatedeclaration.h ;)

> those export macro's evaluate to declspec(dllimport)
when the file is
> #included in a c++ file outside the same library and
they evaluate to
> declspec(dllexport) in the case that the file is
included or compiled in
> the library it belongs to.
>
> The question is why mingw thinks the function is
defined twice.  And I
> really have no good idea either :(

I really don't have a clue. But maybe it's not right using
the 
CPPDUCHAIN_EXPORT there, but instead only "export"
or something. It might 
need some experimentation with mingw.

Greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Problems building duchain on win32
user name
2008-03-29 04:01:45
On 28.03.08 23:01:53, David Nolden wrote:
> On Friday 28 March 2008 22:42:51 Andreas Pakulat
wrote:
> > Interesting, yes that does make some sense as the
function is not
> > visible outside the library... Can you put the
function into the header?
> 
> That would be the moment that mingw would be right in
saying "was defined 
> multiple times", because it would be defined in
every file that includes 
> templatedeclaration.h ;)
>
> > those export macro's evaluate to
declspec(dllimport) when the file is
> > #included in a c++ file outside the same library
and they evaluate to
> > declspec(dllexport) in the case that the file is
included or compiled in
> > the library it belongs to.
> >
> > The question is why mingw thinks the function is
defined twice.  And I
> > really have no good idea either :(
> 
> I really don't have a clue. But maybe it's not right
using the 
> CPPDUCHAIN_EXPORT there, but instead only
"export" or something. It might 
> need some experimentation with mingw.

:( I guess this has to wait then until I can get my hands on
a win32
machine again.

Andreas

-- 
You will be awarded the Nobel Peace Prize... posthumously.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )