Development > Newbie Coding
compile using MinGW
Mattn:
check for special flags for configure here:
http://hg.savannah.gnu.org/hgweb/mingw-cross-env/file/100f824d2db1/src
Muton:
Tried that already ;)
I than tried to build gtk+ on Win32 MinGW without success (its a pain)
than i've searched the root of the "problem"
and thats finally the solution (as dexcribed here)
We need something >like< that
ufoai/src/tools/radiant/radiant/dialogs/about.cpp
Line: 130 && 140
--- Code: ---#ifdef static
g_snprintf(versionString, sizeof(versionString), "%i.%i.%i", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
#else
g_snprintf(versionString, sizeof(versionString), "%i.%i.%i", gtk_major_version, gtk_minor_version, gtk_micro_version);
#endif
............
#ifdef static
g_snprintf(versionString, sizeof(versionString), "%i.%i.%i", GTKGLEXT_MAJOR_VERSION, GTKGLEXT_MINOR_VERSION, GTKGLEXT_MICRO_VERSION);
#else
g_snprintf(versionString, sizeof(versionString), "%i.%i.%i", gtkglext_major_version, gtkglext_minor_version, gtkglext_micro_version);
#endif
--- End code ---
Mattn:
why would that be needed? i mean, the if case - can't we just always use the macros from the headers?
Muton:
You are right
radiant compiles even with dynamic libs
I was not sure ...
Edit
This tool is not ready to be linked statically
line 150 must also be edited
g_snprintf(versionString, sizeof(versionString), "%i.%i.%i", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
This function is only available on a shared lib (I give up!)
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0x8c0): undefined reference to `_imp__g_threads_got_initialized'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0x8cb): undefined reference to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0x92f): undefined reference to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xc76): undefined reference to `_imp__g_threads_got_initialized'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xc81): undefined reference to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xc9d): undefined reference to `_imp__g_threads_got_initialized'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xca8): undefined reference to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xcc6): undefined reference to `_imp__g_threads_got_initialized'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xcd1): undefined reference
to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xd01): undefined reference to `_imp__g_threads_got_initialized'
.objs\radiant\src\tools\radiant\radiant\exec.o:exec.cpp:(.text+0xd0c): undefined reference to `_imp__g_thread_functions_for_glib_use'
.objs\radiant\src\tools\radiant\radiant\main.o:main.cpp:(.text+0x15f7): undefined reference to `_imp__g_threads_got_initialized'
even if i add every lib i have
i got tons of linker errors
Mattn:
the g_threads is an own lib - are you sure you linked that one, too (should be part of the pkg-config file, if not, fix that file instead any linker flags)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version