List Info

Thread: kdevelop-pg needs a way to define an export macro




kdevelop-pg needs a way to define an export macro
user name
2007-07-07 16:38:43
Hi,

There's a problem with using kdevelop-pg in that it doesn't
allow to use
the generated classes in shared libraries. And static
libraries are not
allowed and seemingly don't work in KDE4.

So I added KDEVPG_EXPORT macro's to the generated classes
(which needs
to be redefined in the using library to the proper export
macro),
however that doesn't allow to access the token stream class
from
outside. I tried to do that there as well, but as one can't
tell it
which header to include for the real EXPORT macro this
doesn't work
(unless you copy it, which I think should be avoided if
possible).

So what other options do people(Jakob, Alex) see? 

Andreas

-- 
Lady Luck brings added income today.  Lady friend takes it
away tonight.

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

Re: kdevelop-pg needs a way to define an export macro
user name
2007-07-09 17:15:45
On 07.07.07 23:38:43, Andreas Pakulat wrote:
> Hi,
> 
> There's a problem with using kdevelop-pg in that it
doesn't allow to use
> the generated classes in shared libraries. And static
libraries are not
> allowed and seemingly don't work in KDE4.
> 
> So I added KDEVPG_EXPORT macro's to the generated
classes (which needs
> to be redefined in the using library to the proper
export macro),
> however that doesn't allow to access the token stream
class from
> outside. I tried to do that there as well, but as one
can't tell it
> which header to include for the real EXPORT macro this
doesn't work
> (unless you copy it, which I think should be avoided if
possible).
> 
> So what other options do people(Jakob, Alex) see? 

Actually it seems this is not needed that much. Anyway, as I
wanted a
way to declare a separate namespace (not using namespace for
the
filename prefix) I played around with the export macro as
well. Attached
is a diff that adds

--exportmacro=FOO
--exportheader=fooexport.h

options to the kdev-pg executable and generates proper files
for this.
Just in case somebody needs this...

Andreas

-- 
Are you sure the back door is locked?

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

  
[1-2]

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