[glibmm] Missing header files in normal installation

I am exporting a Gtk application to Windows. For various reasons I require to use the MSVC compiler instead of MSYS2, so I had to compile glib and glibmm, between others, from source.

I compiled both glib and glibmm and linked them to the application succesfully. However, it seems a file named “unicode.h” is missing from glibmm:

glibmm/ustring.h(21): fatal error C1083: Non è possibile aprire il file inclusione: 'glibmm/unicode.h': No such file or directory

I checked to see if it was a problem of mine or maybe I had forgotten to enable some build flag. However, nowhere in the glibmm repository I found a file named “unicode.h”. I found in glib (C) a file named “gunicode.h”, is it that? If so, why is glibmm trying to include “glibmm/unicode.h”?

Full log: https://pastebin.com/NXnLU3gj

I created a blank “unicode.h” file and now I’m getting:

glibmm/containerhandle_shared.h(23): fatal error C1083: Non è possibile aprire il file inclusione: 'glibmm/variant.h': No such file or directory

So it’s not just this file.

Hello @kaixo,

The compiler command-line is missing the include paths for glibmm, which should be "-IC:\Users\PC-AITOR\Documents\deps\out\include\glibmm-2.68" and "-IC:\Users\PC-AITOR\Documents\deps\out\lib\glibmm-2.68\include". Can you post the output of meson setup?

FAILED: subprojects/wrapper/libdepixelize_LIB.a.p/libdepixelize_kopftracer2011.cpp.obj
"cl" "-Isubprojects\wrapper\libdepixelize_LIB.a.p" "-Isubprojects\wrapper" "-I..\subprojects\wrapper"
"-IC:\Users\PC-AITOR\Documents\deps\out\include\glib-2.0"
"-IC:\Users\PC-AITOR\Documents\deps\out\lib\glib-2.0\include"
"-IC:\Users\PC-AITOR\Documents\deps\out\include"
"-IC:\Users\PC-AITOR\Documents\deps\out\include\cairo"
"-IC:\Users\PC-AITOR\Documents\deps\out\include\pixman-1"
"-IC:\Users\PC-AITOR\Documents\deps\out\include\libpng16"
"-I..\subprojects\wrapper\2geom\include"
"-IC:\Users\PC-AITOR\Documents\deps\out\include\boost-1_90"
"/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W4" "/EHsc" "/std:c++20" "/permissive-" "/O2" "/Gw" "-D_AFXDLL=1" "/DWIN32" "/D_WINDOWS" "/GR" "/EHsc" "/MD" "/Ob2" "/DNDEBUG"
"/Fdsubprojects\wrapper\libdepixelize_LIB.a.p\libdepixelize_kopftracer2011.cpp.pdb"
/Fosubprojects/wrapper/libdepixelize_LIB.a.p/libdepixelize_kopftracer2011.cpp.obj
"/c" ../subprojects/wrapper/libdepixelize/kopftracer2011.cpp

In the git repository there is glibmm/glib/src/unicode.hg.
If you build from a git clone, glib/glibmm/unicode.h is a generated file
in the build directory. Tarballs contain generated source files, among them
untracked/glib/glibmm/unicode.h. glibmm/variant.h is also a generated file.

2 Likes

It is not missing the include paths for glibmm. It’s glibmm that’s missing these files. @kjellahl pointed out the reason!