Re: Glibmm dynamic loading modules and libglademm



Oh, thanks. That was the essential part of the question.
Thanks for the information about the macros. I´ve seen Dev-C++ made
some #define statements for the __declspec(dllexport) and (dllimport),
but didn´t know Glib had it. What a portability... Eventhough I don´t
know if I´m going to use the Glib macros, because I thought people
could develop dll for my plugin system without the need of GTKmm
development environment installed.
I´ll think about it...

Thanks again.
Arthur


2007/1/17, Daniel Elstner <daniel kitta googlemail com>:
Am Dienstag, den 16.01.2007, 15:32 -0200 schrieb Arthur Maciel:
> I´m trying to use Glibmm::Module to load dll´s and shared libs to make
> a plugin system. Indeed it is working now on Windows. I have not tried
> to run it on linux yet.
> Nice portability of Glibmm stuff. Eventhough, if I want to create a
> fully portable code between Windows and Linux I´ll have to use some
> pre-processor definitions to include and exclude Win32 API specific
> stuff, right?

I don't know much about this, other than you should prefix function
declarations with G_MODULE_EXPORT, which expands on Windows to the
necessary declspec(dllexport), or whatever it was to mark functions for
export in a DLL.  If you need separate code for the platforms, you can
use the G_OS_WIN32 and G_PLATFORM_WIN32 preprocessor defines.  See the
GLib documentation for the difference between these two macros, I don't
remember the details.

> Was that what you wanted to know?

Actually, no.  I realize now that the wording of my reply was ambiguous.
I was referring to the first part of question 2:

> 2) When I load an interface with libglademm, if I have a notebook if
> two pages and each contain a label called page_name, with get_widget()
> how could I load the first page or the second page label? Is it
> possible (to have same name for two widget on a .glade file)?

Of this question, I only understood the part in parentheses, and that's
the part I answered to.

--Daniel






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]