User forums > Using Code::Blocks
Compile gtkm3 project on windows
rebraoul:
I'm struggeling in using gtkm3.0.
I've installed gtkm3.0 and pkg-config and MSys2 by strictly folowing https://wiki.gnome.org/Projects/gtkmm/MSWindows (pretty clear step by step).
Then I arrived upto the critical point to test with the proposed simple code ::) and... it returns an error: "'mutex' does not name a type". Reading at some tuto on internet https://stackoverflow.com/questions/14191566/c-mutex-in-namespace-std-does-not-name-a-type but not only, I've discovered that this issue was cleared with the MinGw64 x64 as it handles threading. Then I installed MinGw64 x64 (with pacman -S mingw-w64-x86_64-gcc) and setup the correct compiler toolchain in C::B (or at least, I think I'm good on that point).
However, even doing all these steps I still have a collection of errors (see below the first lines but their are 20 of them) .
I may have missed something somewhere. Can someone guide me?
undefined reference to `___gxx_personality_sj0`
undefined reference to `___ZN4GLib7ustringD1Ev`
undefined reference to `___ZN3Gtk6WindowC1ENS_10WindowTypeE`
I'm kind of lost... Thank for your help,
....
sodev:
It looks like you are using the prebuild libraries but dont use the same compiler to build the final application. A pure guess from the names is that you either dont use the same exception model (SJLJ vs. DWARF) or dont use the same C++ version (pre c++11 vs. c++11 or newer).
rebraoul:
Yes, I used a prebuilt library as it comes in package from pacman. But how can I know the compiler that was used. I tried to change the compiler in compiler setting of C::B but none that tried worked. I'm using g++.
stahta01:
Attach your project to this thread and I will see if it works for me. I am using MSys2, also.
Edit: No need for your project; I attached the one I created in the next post.
Post a build log of your project or of my project and we can try to see where the error is located.
Tim S.
stahta01:
Build log
--- Code: ----------------- Build: Release in testgtkmm (compiler: GNU GCC Compiler)---------------
x86_64-w64-mingw32-g++.exe -Wall -mms-bitfields -pthread -mms-bitfields -IC:/msys64/mingw64/include/gtkmm-3.0 -IC:/msys64/mingw64/lib/gtkmm-3.0/include -IC:/msys64/mingw64/include/atkmm-1.6 -IC:/msys64/mingw64/include/gdkmm-3.0 -IC:/msys64/mingw64/lib/gdkmm-3.0/include -IC:/msys64/mingw64/include/giomm-2.4 -IC:/msys64/mingw64/lib/giomm-2.4/include -IC:/msys64/mingw64/include/pangomm-1.4 -IC:/msys64/mingw64/lib/pangomm-1.4/include -IC:/msys64/mingw64/include/glibmm-2.4 -IC:/msys64/mingw64/lib/glibmm-2.4/include -IC:/msys64/mingw64/include/gtk-3.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/pango-1.0 -IC:/msys64/mingw64/include/fribidi -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/atk-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/cairomm-1.0 -IC:/msys64/mingw64/lib/cairomm-1.0/include -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/pixman-1 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/sigc++-2.0 -IC:/msys64/mingw64/lib/sigc++-2.0/include -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/lib/libffi-3.2.1/include -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -O2 -c C:\Users\stahta01\devel\open_source_code\no_version_control\test\testgtkmm\main.cpp -o obj\Release\main.o
x86_64-w64-mingw32-g++.exe -o bin\Release\testgtkmm.exe obj\Release\main.o -LC:/msys64/mingw64/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lz -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lgio-2.0 -lcairomm-1.0 -lcairo -lsigc-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -s -mwindows
Output file is bin\Release\testgtkmm.exe with size 20.00 KB
Process terminated with status 0 (0 minute(s), 7 second(s))
0 error(s), 0 warning(s) (0 minute(s), 7 second(s))
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version