Skip to content

Instantly share code, notes, and snippets.

@mkhon
Created March 5, 2015 12:02
Show Gist options
  • Save mkhon/01a1536b01e0065ae799 to your computer and use it in GitHub Desktop.
Save mkhon/01a1536b01e0065ae799 to your computer and use it in GitHub Desktop.
Fix apr-iconv 1.2.1 build with VS2013
Fix apr-iconv build with Visual Studio 2013 (and earlier?).
The error without the patch is:
adobe-stdenc.obj : error LNK2011: precompiled object not linked in; image may not run
..\Release\iconv\adobe-stdenc.so : fatal error LNK1120: 1 unresolved externals
--- build/modules.mk.win.orig 2007-10-19 05:49:36.000000000 +0700
+++ build/modules.mk.win 2015-03-05 17:49:21.000000000 +0600
@@ -218,7 +218,7 @@
.c{$(OUTPUT_DIR)}.so:
$(SILENT)cl $(ALL_CFLAGS) /Fo$*.obj /Yuiconv.h /c $<
- $(SILENT)link $(ALL_LDFLAGS) $*.obj $(API_LIBS) /out:$@ \
+ $(SILENT)link $(ALL_LDFLAGS) $*.obj $(MODRES).obj $(API_LIBS) /out:$@ \
/base:@"..\build\BaseAddr.ref",$(@F)
$(SILENT)if exist [email protected] \
$(SILENT)mt -nologo -manifest [email protected] -outputresource:$@;2 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment