Hello, I imported module 'putenv'. When cross-compiling through mingw32, I get the following errors at link time:
i586-mingw32msvc-gcc -g -O2 -Wall -std=c99 -I/usr/local/i586-mingw32msvc/include -I/usr/local/i586-mingw32msvc/lib/libffi-3.0.7/include -I/usr/local/i586-mingw32msvc/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main `: /usr/local/bin` -o freedink.exe bgm.o dinkini.o dinkc.o dinkc_bindings.o dinkc_console.o dinkc_sp_custom.o dinkvar.o fastfile.o game_engine.o str_util.o io_util.o sfx.o gfx.o gfx_fade.o gfx_tiles.o gfx_utils.o gfx_fonts.o init.o rect.o input.o binreloc.o freedink_xpm.o paths.o log.o gfx_sprites.o vgasys_fon.o msgbox.o i18n.o SDL_rwops_libzip.o freedink.o update_frame.o woeres.o ../gnulib/lib/libgnu.a ../intl/libintl.a -lSDL_mixer -lSDL_image -lSDL_ttf -lSDL_gfx -L/usr/local/i586-mingw32msvc/lib -lzip -lz -L/usr/local/i586-mingw32msvc/lib -lffi -L/usr/local/i586-mingw32msvc/lib -lmingw32 -lSDLmain -lSDL -mwindows -lm ../gnulib/lib/libgnu.a(putenv.o): In function `rpl_putenv': /usr/src/t/freedink-1.08.20081207/cross/gnulib/lib/../../../gnulib/lib/putenv.c:107: undefined reference to `_environ' /usr/src/t/freedink-1.08.20081207/cross/gnulib/lib/../../../gnulib/lib/putenv.c:120: undefined reference to `_environ' /usr/src/t/freedink-1.08.20081207/cross/gnulib/lib/../../../gnulib/lib/putenv.c:126: undefined reference to `_environ' ../gnulib/lib/libgnu.a(putenv.o): In function `_unsetenv': /usr/src/t/freedink-1.08.20081207/cross/gnulib/lib/../../../gnulib/lib/putenv.c:70: undefined reference to `_environ' collect2: ld returned 1 exit status I tried to add the 'environ' module as well but this didn't change. Incidentally, compilation works when I remove the 'putenv' module. Maybe the 'putenv' function need not be replaced in this case? I don't really understand where '_environ' comes from (this is not the '__environ' from gnulib with double '_') - as far as I understand mingw32 tend to add a '_' to lots of core functions for some reason. -- Sylvain