diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl
index f0d082a46b..1fa03adc23 100644
--- a/build/bakefiles/common.bkl
+++ b/build/bakefiles/common.bkl
@@ -594,10 +594,16 @@ $(TAB)$(VC_COMPILER) /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\r
$(EXTRALIBS_FOR_GUI)
+
+ $(LIB_PNG)
+
-
+
$(WXLIB_MONO)
+ $(LIB_PNG_IF_MONO)
diff --git a/samples/console/Makefile.in b/samples/console/Makefile.in
index 9308653e93..c1eeaf71d6 100644
--- a/samples/console/Makefile.in
+++ b/samples/console/Makefile.in
@@ -74,6 +74,10 @@ COND_MONOLITHIC_0___WXLIB_BASE_p = \
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
+@COND_MONOLITHIC_1@__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \
@@ -101,7 +105,7 @@ distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
console$(EXEEXT): $(CONSOLE_OBJECTS)
- $(CXX) -o $@ $(CONSOLE_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+ $(CXX) -o $@ $(CONSOLE_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
$(__console___mac_setfilecmd)
diff --git a/samples/console/console_vc7.vcproj b/samples/console/console_vc7.vcproj
index 0246f447d0..2d58006d03 100644
--- a/samples/console/console_vc7.vcproj
+++ b/samples/console/console_vc7.vcproj
@@ -46,7 +46,7 @@