C++ CodeBlocks compile two source files - c++

I have tried to compile those files by CodeBlocks which i have downloaded from here:
https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/frame?h=master
When i try to compile it with Code Blocks i get that error:
main.cpp|8|undefined reference to `ExampleWindow::ExampleWindow()'|
But i compile it like that from terminal it works:
g++ main.cc examplewindow.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`
Is there any idea how to make Code Blocks compile two source files ?
-------------- Build: Debug in youtube (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -g -std=gnu++11 -pthread
-I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/atk-1.0 -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -I/usr/include/ -I/usr/lib/x86_64-linux-gnu/ -c /home/bahaa/programming/c++/youtube/main.cpp -o obj/Debug/main.o g++
-o bin/Debug/youtube obj/Debug/main.o -L/usr/lib/mysql -lmysqlclient -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 obj/Debug/main.o: In function main': /home/bahaa/programming/c++/youtube/main.cpp:8: undefined
reference toExampleWindow::ExampleWindow()'
/home/bahaa/programming/c++/youtube/main.cpp:8: undefined reference to
ExampleWindow::~ExampleWindow()'
/home/bahaa/programming/c++/youtube/main.cpp:8: undefined reference to
ExampleWindow::~ExampleWindow()' collect2: error: ld returned 1 exit
status Process terminated with status 1 (0 minutes, 1 seconds) 3
errors, 0 warnings (0 minutes, 1 seconds)
https://www.youtube.com/watch?v=3v3koVNb7hU&feature=youtu.be

The command you put in your terminal looks completely different from the command codeblocks is executing, so the fact that it does something different is logic.
However in the case of a undefined reference it usually means that you are forgetting an include somewhere. Where is ExampleWindow declared/defined? Is it in included in your main through one of the two includes you are doing?

Related

ld.exe: cannot find -ldwrite and -ldwmapi

As the title, I have this error while compiling an hello world demo with gtk in codelite...the exactly error is
C:\WINDOWS\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -e -f Makefile
Building project:[ CodeLiteGTK3 - Debug ]----------
mingw32-make[1]: Entering directory 'C:/Users/Diana/Documents/CodeLiteWorkspace/CodeLiteGTK3'
C:/MinGW/bin/g++.exe -o Debug/CodeLiteGTK3 #"CodeLiteGTK3.txt" -L. -L/mingw64/lib -L/mingw64/lib/../lib -L/mingw64/lib -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lz -lepoxy -lopengl32 -lgdi32 -lpangocairo-1.0 -lm -lgdi32 -lpangoft2-1.0 -lm -lpangowin32-1.0 -lm -lusp10 -lgdi32 -lpango-1.0 -lm -lfribidi -lthai -ldatrie -latk-1.0 -lcairo-gobject -lcairo -lz -lpixman-1 -lm -pthread -lfontconfig -liconv -lexpat -lfreetype -lbz2 -lharfbuzz -lm -lusp10 -lgdi32 -lrpcrt4 -ldwrite -lgraphite2 -lpng16 -lz -lgdk_pixbuf-2.0 -lm -lgdiplus -lole32 -ljpeg -ljasper -lpng16 -lz -ltiff -lzstd -llzma -ljpeg -lz -lgio-2.0 -pthread -lintl -lshlwapi -ldnsapi -liphlpapi -lws2_32 -pthread -lgmodule-2.0 -lintl -lz -lgobject-2.0 -pthread -lintl -lffi -lintl -lglib-2.0 -lws2_32 -lole32 -lwinmm -lshlwapi -pthread -lpcre
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot find -ldwrite
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Debug/CodeLiteGTK3] Error 1
CodeLiteGTK3.mk:78: recipe for target 'Debug/CodeLiteGTK3' failed
mingw32-make[1]: Leaving directory 'C:/Users/Diana/Documents/CodeLiteWorkspace/CodeLiteGTK3'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====
here the code.
#include <gtk/gtk.h>
int main(int argc, char *argv[])
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
can somebody help me please?
Thanks in advance!
as g++ option, add -I/mingw64/include/gtk-3.0/
in Settings -> Build setting -> Compilers
click Apply Ok ..I haven't tried for setting clang++ as compiler though
BTW, edit the code with print Hello world at the first place said

installing C++ library with homebrew

I'm trying to install a C++ library (gtkmm) for my project and to test this installation with a simple test file (the main from wikipedia page about gtkmm).
I did brew install gtkmm3, it installed it but when I compile with clang++ -Wall -Werror -Wextra -o test test.cpp it doesn't find my header :
test.cpp:15:10: fatal error: 'gtkmm-3.0/gtkmm.h' file not found
#include <gtkmm-3.0/gtkmm.h>
The header is located at ~/homebrew/include/gtkmm-3.0/gtkmm.h.
I tried :
adding $HOME"/homebrew/include" to $PATH and using #include <gtkmm-3.0/gtkmm.h> in my source file.
adding $HOME"/homebrew/include/gtkmm-3.0" to my $PATH and using #include <gtkmm.h> in my source file.
But I still can't compile.
How could I do?
Yes, use pkgconfig like this and it will tell you all the include paths and the link paths you need:
pkg-config --libs --cflags /usr/local/Cellar/gtkmm3/*/lib/pkgconfig/gdkmm-3.0.pc
Output
-D_REENTRANT -I/usr/local/Cellar/gtkmm3/3.18.0/include/gdkmm-3.0
-I/usr/local/Cellar/gtkmm3/3.18.0/lib/gdkmm-3.0/include
-I/usr/local/Cellar/glibmm/2.46.3/include/giomm-2.4
-I/usr/local/Cellar/glibmm/2.46.3/lib/giomm-2.4/include
-I/usr/local/Cellar/pangomm/2.38.1/include/pangomm-1.4
-I/usr/local/Cellar/pangomm/2.38.1/lib/pangomm-1.4/include
-I/usr/local/Cellar/glibmm/2.46.3/include/glibmm-2.4
-I/usr/local/Cellar/glibmm/2.46.3/lib/glibmm-2.4/include
-I/usr/local/Cellar/gtk+3/3.18.6/include/gtk-3.0
-I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/
-I/usr/local/Cellar/cairo/1.14.6/include/cairo
-I/usr/local/Cellar/libepoxy/1.3.1/include
-I/usr/local/Cellar/pango/1.38.1/include/pango-1.0
-I/usr/local/Cellar/harfbuzz/1.1.3/include/harfbuzz
-I/usr/local/Cellar/pango/1.38.1/include/pango-1.0
-I/usr/local/Cellar/atk/2.18.0/include/atk-1.0
-I/usr/local/Cellar/cairo/1.14.6/include/cairo
-I/usr/local/Cellar/cairomm/1.12.0/include/cairomm-1.0
-I/usr/local/Cellar/cairomm/1.12.0/lib/cairomm-1.0/include
-I/usr/local/Cellar/cairo/1.14.6/include/cairo
-I/usr/local/Cellar/pixman/0.32.8/include/pixman-1
-I/usr/local/Cellar/fontconfig/2.11.1/include
-I/usr/local/Cellar/freetype/2.6_1/include/freetype2
-I/usr/local/Cellar/libpng/1.6.20/include/libpng16
-I/usr/local/Cellar/libsigc++/2.6.2/include/sigc++-2.0
-I/usr/local/Cellar/libsigc++/2.6.2/lib/sigc++-2.0/include
-I/usr/local/Cellar/gdk-pixbuf/2.32.3/include/gdk-pixbuf-2.0
-I/usr/local/Cellar/libpng/1.6.20/include/libpng16
-I/usr/local/Cellar/glib/2.46.2/include/glib-2.0
-I/usr/local/Cellar/glib/2.46.2/lib/glib-2.0/include
-I/usr/local/opt/gettext/include
-L/usr/local/Cellar/gtkmm3/3.18.0/lib
-L/usr/local/Cellar/glibmm/2.46.3/lib
-L/usr/local/Cellar/pangomm/2.38.1/lib
-L/usr/local/Cellar/glibmm/2.46.3/lib
-L/usr/local/Cellar/gtk+3/3.18.6/lib
-L/usr/local/Cellar/pango/1.38.1/lib
-L/usr/local/Cellar/atk/2.18.0/lib
-L/usr/local/Cellar/cairo/1.14.6/lib
-L/usr/local/Cellar/glib/2.46.2/lib
-L/usr/local/Cellar/cairomm/1.12.0/lib
-L/usr/local/Cellar/cairo/1.14.6/lib
-L/usr/local/Cellar/libsigc++/2.6.2/lib
-L/usr/local/Cellar/gdk-pixbuf/2.32.3/lib
-L/usr/local/Cellar/glib/2.46.2/lib
-L/usr/local/opt/gettext/lib
-lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lgtk-3 -lgdk-3 -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
Then you can compile with:
clang++ $(pkg-config --libs --cflags /usr/local/Cellar/gtkmm3/*/lib/pkgconfig/gdkmm-3.0.pc) someFile.cpp -o someFile

Delay Loading DWMAPI on Windows XP and CodeBlocks

I have a project that I'm been fighting to build for Windows (XP) for a month solid now. The project uses gtkmm-3, C++, and the latest GCC-TDM compiler. My IDE is CodeBlocks 13.14.
I'm making progress, however, I am now getting hung up on this error message...
ld.exe cannot find -ldwmapi
Now, DWMAPI is a DLL only available on Windows Vista and above. According to my research, you can Delay Loading of certain DLLs in cases where they are present on some systems, but not on others.
The problem is, I have no clue how to do this on CodeBlocks. The -z lazy option does not accomplish this. If Delay Loading is impossible, how do I get around the dwmapi dependency. There has to be a way!
Full Build Command: (errors at bottom)
-------------- Clean: Debug in infiltrator (compiler: GNU GCC Compiler)---------------
Cleaned "infiltrator - Debug"
-------------- Build: Debug in infiltrator (compiler: GNU GCC Compiler)---------------
mingw32-g++-dw2.exe -std=c++11 -Wall -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -std=c++11 -Wall -g -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -z lazy -std=c++11 -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Iinclude -IC:\dev\MinGW\include -c "C:\Documents and Settings\Jason\Desktop\infiltrator\main.cpp" -o obj\Debug\main.o
mingw32-g++-dw2.exe -std=c++11 -Wall -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -std=c++11 -Wall -g -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -z lazy -std=c++11 -mms-bitfields -pthread -IC:/dev/MinGW/include/glibmm-2.4 -IC:/dev/MinGW/lib/glibmm-2.4/include -IC:/dev/MinGW/include/sigc++-2.0 -IC:/dev/MinGW/lib/sigc++-2.0/include -IC:/dev/MinGW/include/glib-2.0 -IC:/dev/MinGW/lib/glib-2.0/include -IC:/dev/MinGW/include/gtkmm-3.0 -IC:/dev/MinGW/lib/gtkmm-3.0/include -IC:/dev/MinGW/include/atkmm-1.6 -IC:/dev/MinGW/include/giomm-2.4 -IC:/dev/MinGW/lib/giomm-2.4/include -IC:/dev/MinGW/include/pangomm-1.4 -IC:/dev/MinGW/lib/pangomm-1.4/include -IC:/dev/MinGW/include/gtk-3.0 -IC:/dev/MinGW/include/cairomm-1.0 -IC:/dev/MinGW/lib/cairomm-1.0/include -IC:/dev/MinGW/include/gdk-pixbuf-2.0 -IC:/dev/MinGW/include/gdkmm-3.0 -IC:/dev/MinGW/lib/gdkmm-3.0/include -IC:/dev/MinGW/include/atk-1.0 -IC:/dev/MinGW/include/pango-1.0 -IC:/dev/MinGW/include/cairo -IC:/dev/MinGW/include/pixman-1 -IC:/dev/MinGW/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -IC:/dev/MinGW/include/freetype2 -IC:/dev/MinGW/include/libpng16 -IC:/dev/MinGW/include/harfbuzz -Iinclude -IC:\dev\MinGW\include -c "C:\Documents and Settings\Jason\Desktop\infiltrator\src\agentDatabase.cpp" -o obj\Debug\src\agentDatabase.o
mingw32-g++-dw2.exe -LC:\dev\MinGW\lib -o bin\Debug\infiltrator.exe obj\Debug\main.o obj\Debug\src\agentDatabase.o obj\Debug\src\agentWindow.o obj\Debug\src\customWidgets.o obj\Debug\src\fileEncryption.o obj\Debug\src\gameWindow.o obj\Debug\src\infoWindow.o obj\Debug\src\keyGen.o obj\Debug\src\playerList.o obj\Debug\src\primaryWindow.o obj\Debug\src\setupWindow.o -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -Wl,-luuid -LC:/dev/MinGW/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi -lz -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl
C:/dev/MinGWOld/bin/../lib/gcc/mingw32/5.1.0-dw2/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
C:/dev/MinGWOld/bin/../lib/gcc/mingw32/5.1.0-dw2/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
C:/dev/MinGWOld/bin/../lib/gcc/mingw32/5.1.0-dw2/../../../../mingw32/bin/ld.exe: cannot find -ldwmapi
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (1 minute(s), 42 second(s))
3 error(s), 7 warning(s) (1 minute(s), 42 second(s))
Lazy linking, -z lazy, is the GNU linker's default on unix-like systems and
is not supported in the MinGW Windows ports. (This has nothing to do with
Code::Blocks)
I cannot fathom the hope that you repose in lazy linking to overcome
this problem, but it doesn't matter. If you can't count on some shared library
to be available on all target systems of your project one customary course
is to link the library statically in your executable. You can do that here.
The 32-bit TDM GCC that you are now using does not ship dwmapi in a static
library but the corresponding 64-bit toolchain does ship both 64- and 32-bit
builds of it, respectively:
<TDM-GCC-64-install-dir>/x86_64-w64-mingw32/lib/libdwmapi.a
and
<TDM-GCC-64-install-dir>/x86_64-w64-mingw32/lib32/libdwmapi.a
Those paths are among the linker defaults for the toolchain, so it
will link the library if you simply mention -ldwmapi in the linker options
(as you have done).
The absence of libdwmapi.a in the 32-bit toolchain may just be an anomaly, or
it may be a decision based on the fact that this library was not around until
Windows had transitioned to 64-bit in the mainstream.
You have 3 options then:
If you have no committment to building 32-bit you can swap to the
corresponding 64-bit toolchain (and 64-bit libraries accross the board)
Swap to the 64-bit toolchain but continue to build 32-bit by adding the
option -m32 for the compiler and linker
Install the 64-bit toolchain, continue using the 32-bit toolchain,
but add -L<TDM-GCC-64-install-dir>/x86_64-w64-mingw32/lib32 to your
linker search paths, after all those you have already specified.
A couple of unrelated observations:-
In this and your previous question all of
your g++ commandline options appear 3 times each! - yielding 4K commandlines that make
very tiresome parsing. With the Code::Blocks IDE, the only way in which you can have
produced this triplication is by setting all of these options once in the global
Settings -> Compiler, then again in the overall project settings infiltrator ->
Build options -> infiltrator, and yet again in the project Debug/Release configuration
settings infiltrator -> Build options -> infiltrator -> Debug/Release.
These 3 levels of settings form an inheritance hierarchy. Do not make any project
specific settings globally for any compiler. Doing so makes them properties of the
compiler and they will be applied to every other project that you build with
that compiler. Project settings that are invariant between project configurations
(Debug/Release) should be made only once at the project level. Debug and Release
options should be set only at the project configuration level.
Lastly I see that you have chosen to install the TDM-GCC-32 variant with Dwarf2
style exception handling, rather than the default package (per the executable
installer) with setjump-longjump style exception handling. This carries a risk.
While DW2 exception handling is significantly more efficient that SJLJ, it is
foreign to Windows and will fail if an exception must propagate through a Windows
library not built in the same way. The setjump-longjump mechamism, though slower,
relies on primtive, long standardized C library facilities that any
C or C++ compiler implements.

How can I use gtkmm with MinGW (g++) without MSYS?

How can I use gtkmm with MinGW (g++) without MSYS?
Here is the story of my problem:
I installed MinGW offline with all required packages (full install). I installed Apache Server and I copied all .tar.gz files and I created a website called sourceforge.org [localhost] and I installed automatically MinGW on Windows XP. After that, I set the PATH variables.
I installed gtkmm for MinGW (g++). I tried to compile a simple window with gtkmm + MinGW, but it does not work.
I use this command line:
g++ simple.cc -o simple `pkg-config gtkmm-2.4 --cflags --libs`
After this, I installed MSYS and I can compile simple.cc with MSYS, using this command line:
g++ simple.cc -o simple `pkg-config gtkmm-2.4 --cflags --libs`
My problem:
I want to compile simple.cc without MSYS. I want compile my simple.cc with cmd.exe - Is this possible? If, yes. How?
base.cc source code:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
Command line:
pkg-config gtkmm-2.4 --cflags --libs
Result:
-mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4-IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0-lgthread-2.0 -lglib-2.0 -lintl
Command line:
g++ base.cc -o base `pkg-config gtkmm-2.4 --cflags --libs`
Result:
g++: `pkg-config: No such file or directory
g++: gtkmm-2.4: No such file or directory
cc1plus.exe: error: unrecognized command line option "-fcflags"
cc1plus.exe: error: unrecognized command line option "-flibs`"
Command line:
g++ base.cc -o base -D_REENTRANT -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4-IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0-lgthread-2.0 -lglib-2.0 -lintl
Result:
Many errors looks like:
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:269: error: ISO C++ forbids declar
ation of `get_icon' with no type
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: `Gio' has not been dec
lared
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: `Icon' was not declare
d in this scope
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: ISO C++ forbids declar
ation of `property_gicon' with no type
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: `Gio' has not been dec
lared
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: `Icon' was not declare
d in this scope
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: ISO C++ forbids declar
ation of `property_gicon' with no type
Command line:
g++ base.cc -o base -mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4-IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0-lgthread-2.0 -lglib-2.0 -lintl
Result:
Many errors looks like:
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:269: error: ISO C++ forbids declar
ation of `get_icon' with no type
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: `Gio' has not been dec
lared
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: `Icon' was not declare
d in this scope
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:589: error: ISO C++ forbids declar
ation of `property_gicon' with no type
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: `Gio' has not been dec
lared
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: `Icon' was not declare
d in this scope
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: template argument 1 is
invalid
C:/gtkmm/include/gtkmm-2.4/gtkmm/statusicon.h:599: error: ISO C++ forbids declar
ation of `property_gicon' with no type
By the way, I'm also using ``, looks like:
g++ base.cc -o base `-mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4-IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0-lgthread-2.0 -lglib-2.0 -lintl`
if I use MSYS I can compile base.cc, but I need to compile it without MSYS.
Another information (perhaps necessary) about PATH (maybe here is the wrong):
Path 1:
Variable name: path
Variable value: C:\MinGW\bin
Path 2:
Variable name: PKG_CONFIG_PATH
Variable value: C:\gtkmm\lib\pkgconfig
What can I do?
Please help me to solve my problem.
I apologize for my English level (in case you did not properly understand my message).
Based on your command line, I'm guessing pkg-config is going to output a set of libraries and compile flags. If you can determine what the output will be for your machine, you can simply substitute that output in place of the command.
I've done something similar when working with SDL. It provides an sdl-config script that has a predictable output on my machine.
Yes, it is possible. First of all Windows command prompt doesn't work with back tics.
Therefore the following command or similar is not going to work.
g++ simple.cc -o simple `pkg-config gtkmm-2.4 --cflags --libs`
The solution is to run pkg-config gtkmm-2.4 --cflags --libs on the command line and copy paste the output in the end of g++ base.cc -o base.
The following code you posted is closest to correct. For my eyes this command should work.
g++ base.cc -o base -mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4-IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0-lgthread-2.0 -lglib-2.0 -lintl
The environment variable paths should be correct as long as you have the utilities installed on those directory paths.

Weird problem porting application. Undefined reference errors in standard libraries

I've recently been trying to port a C++ application. I believe I have all of it's dependencies and such and it all compiles. But then, when it goes to link it I get a lot of weird undefined reference errors.
/usr/local/lib/libglibmm-2.4.so.7.0: undefined reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long, std::_Ios_Seekdir)'
/usr/local/lib/libglibmm-2.4.so.7.0: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_empty_rep_storage'
/usr/local/lib/libxml++-2.6.so.0.1: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
/usr/local/lib/libxml++-2.6.so.0.1: undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned long)'
What can cause this kind of errors? What do the linking errors mean? I can't really understand the complicated template error messages that gcc gives..
The linking command in it's entirety:
gmake[3]: Entering directory `/home/earlz/synfig-0.62.00/src/tool'
/bin/sh ../../libtool --tag=CXX --mode=link eg++ -I/usr/local/include/libxml++-2.6 -I/usr/local/lib/libxml++-2.6/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/local/share/locale\" -DNDEBUG -O2 -W -Wall -o synfig synfig-main.o ../synfig/libsynfig.la -L/usr/local/lib -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -liconv -lsigc-2.0 -lpthread -L/usr/local/lib -lsigc-2.0 -L/usr/local/lib -lintl -L/usr/local/lib -liconv -lpthread
libtool: link: eg++ -I/usr/local/include/libxml++-2.6 -I/usr/local/lib/libxml++-2.6/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\"/usr/local/share/locale\" -DNDEBUG -O2 -W -Wall -o .libs/synfig synfig-main.o -L../synfig/.libs -lsynfig -L/usr/local/lib -lxml++-2.6 -lxml2 -lm -lz -lglibmm-2.4 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lpcre -lsigc-2.0 -lintl -liconv -lpthread -Wl,-rpath,/usr/local/lib
Also, I do not get any kind of linking errors about missing files, just stuff about weird string and filestream stuff missing
Use g++ to link C++ applications, that add C++ standard libraries to the link phase.