When i run build task from the terminal in vs code i get this error:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpangowin64-1.0
C:/msys64/mingw64/bin/../lib/libmingw32.a: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
Build finished with error(s).
Here's my c_cpp_properies.json (only includePaths):
(All the include paths are taken from pkgconf --cflags)
"includePath": [
"${workspaceFolder}/**",
"C:\\msys64\\mingw64\\include\\gtk-4.0\\gtk",
"C:\\msys64\\mingw64\\include\\gtk-3.0\\gtk",
"C:\\msys64\\mingw64\\include\\pango-1.0",
"C:\\msys64\\mingw64\\include\\**",
"C:\\msys64\\mingw64\\include\\glib-2.0",
"C:\\msys64\\mingw64\\include\\harfbuzz",
"C:\\msys64\\mingw64\\include\\freetype2",
"C:\\msys64\\mingw64\\include\\libpng16",
"C:\\msys64\\mingw64\\include\\fribidi",
"C:\\msys64\\mingw64\\include\\cairo",
"C:\\msys64\\mingw64\\include\\lzo",
"C:\\msys64\\mingw64\\include\\pixman-1",
"C:\\msys64\\mingw64\\include\\gdk-pixbuf-2.0",
"C:\\msys64\\mingw64\\include\\webp",
"C:\\msys64\\mingw64\\include\\graphene-1.0",
"C:\\msys64\\mingw64\\lib\\gtk-4.0",
"C:\\msys64\\mingw64\\lib\\glib-2.0",
"C:\\msys64\\mingw64\\lib\\**"
],
And here's tasks.json(only args (from pkgconf --libs)):
"args": [
"-fdiagnostics-color=always",
"-g",
"-I${includePath <all elements>}",
"${file}",
"-lgtk-4",
"-lpangowin64-1.0",
"-lpangocairo-1.0",
"-lpango-1.0",
"-lharfbuzz",
"-lgdk_pixbuf-2.0",
"-lcairo-gobject",
"-lcairo",
"-lgraphene-1.0",
"-lgio-2.0",
"-lgobject-2.0",
"-lglib-2.0",
"-lintl",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
],
I have installed all the necessary libraries such as gtk4, toolchain base_devel, glib all from msys64 console
How do i solve this error ?
PS: Aim is to build a GUI based program using C, i have now selected GTK, any alternatives are appreciated too. Also should i switch from VS Code for a better environment ?
"-I${includePath <all elements>}"? Or did you just type it that way in your question to save space? I have never seen such syntax before. Should it not be one-I <path>for each include directory?