[Geany-devel] [pretty-print plugin] Failed to compile geany-plugins with latest geany

Lex Trotman elextr at xxxxx
Sat Sep 12 09:51:32 UTC 2009


Please ignore reply, gmail didn't update the conversation so I didn't
know Eugene had supplied a perfectly good answer :-)

Cheers
Lex

2009/9/12 Lex Trotman <elextr at gmail.com>:
> Hi,
>
> Putting extern will make that a declaration which is what you want in
> a header that is used several times, but you have to define it
> somewhere, usually in a file that is only used once like a .c file.
>
> Cheers
> Lex
>
> 2009/9/12 Cédric Tabin <tabin.cedric at gmail.com>:
>> Hello,
>>
>> If I put 'extern' in ConfigUI.h, geany cannot load my plugin :
>>
>> Can't load plugin: /usr/local/lib/geany/pretty-print.so: undefined symbol:
>> prettyPrintingOptions
>>
>> Do I miss something somewhere ?
>>
>> Regards,
>> Cedric
>>
>> On Sat, Sep 12, 2009 at 10:04 AM, Eugene Arshinov <earshinov at gmail.com>
>> wrote:
>>>
>>> Hi.
>>>
>>> Just declare prettyPrintingOptions as extern in ConfigUI.h:
>>>
>>>  extern PrettyPrintingOptions* prettyPrintingOptions;
>>>
>>> The error is caused by -fno-common GCC option which is in my CFLAGS.
>>> Usually, in header files you should declare all variables as extern.
>>>
>>> Best regards,
>>> Eugene.
>>>
>>> On Sat, 12 Sep 2009 09:48:33 +0200
>>> Cédric Tabin <tabin.cedric at gmail.com> wrote:
>>>
>>> > Hello,
>>> >
>>> > Strange... I tried again and again on my gentoo and it compiles well.
>>> > Does anyone have that kind of problem ? Maybe my headers are wrong (I
>>> > use the variable prettyPrinterOptions into PluginEntry.c that is
>>> > defined into ConfigUI.h). I a boss of C can just take a lool :-)
>>> >
>>> > Regards,
>>> > Cedric
>>> >
>>> > On Sat, Sep 12, 2009 at 8:54 AM, Eugene Arshinov
>>> > <earshinov at gmail.com>wrote:
>>> >
>>> > > Hi all.
>>> > >
>>> > > I can't compile geany-plugins since r918 ("Pretty-print : Doctype
>>> > > supporte added, bugfix on cdata processing") with latest geany
>>> > > (r4176).
>>> > >
>>> > > I installed geany with
>>> > >
>>> > > $ make uninstall && make clean && ./autogen.sh && make && sudo make
>>> > > install
>>> > >
>>> > > and was trying to build geany-plugins
>>> > >
>>> > > $ aclocal && ./autogen.sh && make
>>> > >
>>> > > but it failed:
>>> > >
>>> > > ...
>>> > > libtool: link: gcc -shared  .libs/pretty_print_la-PluginEntry.o
>>> > > .libs/pretty_print_la-PrettyPrinter.o .libs/pretty_print_la-ConfigUI.o
>>> > > -L/usr/local/lib /usr/lib/libgtk-x11-2.0.so
>>> > > /usr/lib/libgdk-x11-2.0.so/usr/lib/
>>> > > libatk-1.0.so /usr/lib/libpangoft2-1.0.so
>>> > > /usr/lib/libgdk_pixbuf-2.0.so-lm /usr/lib/
>>> > > libpangocairo-1.0.so /usr/lib/libgio-2.0.so /usr/lib/libcairo.so
>>> > > /usr/lib/
>>> > > libpango-1.0.so /usr/lib/libfreetype.so -lz -lfontconfig /usr/lib/
>>> > > libgobject-2.0.so /usr/lib/libgmodule-2.0.so
>>> > > /usr/lib/libglib-2.0.so/usr/lib/libxml2.so
>>> > > -march=pentium4   -Wl,-soname -Wl,pretty-print.so
>>> > > -o .libs/pretty-print.so .libs/pretty_print_la-ConfigUI.o:(.bss+0x0):
>>> > > multiple definition of `prettyPrintingOptions'
>>> > > .libs/pretty_print_la-PluginEntry.o:(.bss+0x0): first defined here
>>> > > ...
>>> > >
>>> > > Can anyone reproduce it?
>>> > >
>>> > > Best regards,
>>> > > Eugene.
>>> > > _______________________________________________
>>> > > Geany-devel mailing list
>>> > > Geany-devel at uvena.de
>>> > > http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>>> > >
>>> _______________________________________________
>>> Geany-devel mailing list
>>> Geany-devel at uvena.de
>>> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>>
>>
>> _______________________________________________
>> Geany-devel mailing list
>> Geany-devel at uvena.de
>> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>>
>>
>



More information about the Devel mailing list