Re: [wxVTK] Basic Question. Compiling on Linux and Windows.
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-06-11 07:45:28
|
Hi RS, On Wed, Jun 11, 2008 at 1:04 AM, R S <gri...@ho...> wrote: > Hi, > > This is probably a basic question for all of you, I would like to use wxVTK > in my own project. I tried to include the source files directly in my > project but I gave up because I had to add all the gtk dependencies, headers > and what not to the project which I don't really want to do because I am > using wx. Yeah I know, I can give you all the details for this one. For instance: http://lists.wxwidgets.org/pipermail/wx-dev/2004-September/050814.html I have been begging since 2004 for just *ONE* hook in the wxWidgets library, and they have consistently refuse. Basically they are not happy that I want to access the XWindow pointer on UNIX to open a window. There point of view if if you are using wx-gtk1 you need to know that internally you have open a gtk1 window, and if you want to access anything hidden in gtk1, then YOU need to include all the gtk1 headers, same goes for gtk2... So the real problem is that that port that most people use on *NIX is a double indirection on top of X11, and wx people only probivde access to the first indirection layer. the thing that really pi*** me off, is that Robert Roebling has made this hook available in his python-wx library (the python code of wxVTK is actually cleaner than the c++ library and does not require importing anything from gtk*). Actually if you have python-wx installed on your machine you could call this python function :-P > So I did the standard cmake compilation but that pretty much builds the > samples and leaves with only an object file burried deep in the directory > structure. I cannot simply make a library made of a single class, the overhead is AFAIK way too high (dll initialization, static linking...). Therefore I assumed people would just simply integrate the single C++ class directly into there project. (*) > How can I compile it into a static or dynamic library on linux to include it > into my project? OR how can I add it to my project without going through the > whole gtk run around? Suscribe to wx-dev mailing list, and tell them your story... > I am newbie to cmake so if there is a simple command... don't scream at me No that's not a cmake issue, you HAVE TO (last time I checked) include the gtk header to be able to extract the XWindow pointer from a GTKWindow pointer. HTH -- Mathieu (*) There is also a nasty problem due to my initial design, the wxVTK class has multiple inheritance which make it actually difficult to wrap in a shared/static library... |