Hi!,

El Tue, Nov 10, 2015 at 09:23:41AM -0800, Jason C. McDonald escribio:
> On 11/10/2015 08:47 AM, Dr. Diether Knof wrote:> I have testet in
> Windows XP 32 bit (in a virtual machine), there I need the > dwmapi.dll
> for the 3er version. That dll first appears with Vista, so I took > the
> (dummy) one from wine. > > Greetings > Diether
> 
> Yeah, I did notice that. I was finally able to successfully build in
> Windows 7 64-bit using MSYS2, but I was only able to get the 64-bit
> version. The 32-bit version still escapes me (more DLL errors). I'll
> post that information once I get back to that task.

Well, today I tried to compile one application in Windows 10, and it
worked, so I figured to post here what I did:

- Install msys2, from https://msys2.github.io/

- Followed the instructions, including the first update, closed msys2
  prompt and opened it again.

- In the msys2 prompt, install gcc, gtkmm3 and pkg-config:

  pacman -S mingw-w64-i686-gcc mingw-w64-i686-gtkmm3 pkg-config

- Open the MINGW32 prompt, compile.


Attached is a simple program to demonstrate the compilation, I compiled
with the following command line:

  g++ -O2 -std=c++11 -Wall -o hbar-gtkmm \
       `pkg-config --cflags gtkmm-3.0`   \
       hbar-gtkmm.cc                     \
       `pkg-config --libs gtkmm-3.0`

  ./hbar-gtkmm.exe


Note that -std=c++11 is needed.


Hope it helps,

    Daniel.

#include <gtkmm.h>

class HeaderBarWindow: public Gtk::Window
{
 private:
  Gtk::TextView *tv;

 public:
  HeaderBarWindow()
  {
   set_title("Header Bar Demo");
   set_border_width(10);
   set_default_size(400,200);

   auto hb = Gtk::manage(new Gtk::HeaderBar());
   hb->set_show_close_button(true);
   hb->set_title("Header Bar Example");
   set_titlebar(*hb);

   auto but1 = Gtk::manage(new Gtk::Button());
   but1->set_image_from_icon_name("mail-send-receive-symbolic");
   hb->pack_end(*but1);

   auto box = Gtk::manage(new Gtk::HBox());
   auto btnL = Gtk::manage(new Gtk::Button());
   btnL->add(*Gtk::manage(new Gtk::Arrow(Gtk::ArrowType::ARROW_LEFT,
                                         Gtk::ShadowType::SHADOW_NONE)));
   auto btnR = Gtk::manage(new Gtk::Button());
   btnR->add(*Gtk::manage(new Gtk::Arrow(Gtk::ArrowType::ARROW_RIGHT,
                                         Gtk::ShadowType::SHADOW_NONE)));

   box->add(*btnL);
   box->add(*btnR);
   hb->pack_start(*box);

   tv = Gtk::manage(new Gtk::TextView());
   add(*tv);
   show_all();

   btnL->signal_clicked().connect(sigc::mem_fun(*this, &HeaderBarWindow::btn_lft_clicked));
  }
  void btn_lft_clicked()
  {
   tv->get_buffer()->insert_at_cursor("pressed left\n");
  }
};


int main(int argc, char **argv)
{
  Glib::RefPtr<Gtk::Application> app =
    Gtk::Application::create(argc, argv, "org.gtkmm.examples.headerbar");

  HeaderBarWindow window;
  return app->run(window);
}

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to