apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63413] New: Build fails on Windows 10 due to "apr_xml.obj : error LNK2019: unresolved external symbol _apr_xml_parser_create_internal referenced in function _apr_xml_parse_file@20"
Date Thu, 09 May 2019 05:57:57 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63413

            Bug ID: 63413
           Summary: Build fails on Windows 10 due to "apr_xml.obj : error
                    LNK2019: unresolved external symbol
                    _apr_xml_parser_create_internal referenced in function
                    _apr_xml_parse_file@20"
           Product: APR
           Version: 1.7.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR-util
          Assignee: bugs@apr.apache.org
          Reporter: sinloss@hotmail.com
  Target Milestone: ---

Hi all.

I recently built apr-util on which apache-httpd-2.4.x depends under Windows 10
with CFG="aprutil - Win32 Release", XML_PARSER=libexpatMT and XML_OPTIONS="/D
XML_STATIC" but failed due to a link error:
"apr_xml.obj : error LNK2019: unresolved external symbol
_apr_xml_parser_create_internal referenced in function _apr_xml_parse_file@20".

I tried to investigate it and finally get to the point. In both "aprutil.mak"
and "libaprutil.mak", the "apr_xml_expat.obj" target which contains the
implementation of the function "apr_xml_parser_create_internal" is missing and
can never be linked. I don't know what caused it, but I fixed it by making a
few changes:

1. Add 

SOURCE=.\xml\apr_xml_expat.c

"$(INTDIR)\apr_xml_expat.obj" : $(SOURCE) "$(INTDIR)"
".\include\private\apu_config.h" ".\include\apu.h"
        $(CPP) $(CPP_PROJ) $(SOURCE)

after the "apr_xml.obj" target in both "aprutil.mak" and "libaprutil.mak"

2. Find the proper section as per your own CFG option. Then add the
apr_xml_expat.obj to the LINK32_OBJS in both files as follow:

LINK32_OBJS= \
        "$(INTDIR)\apr_brigade.obj" \
        ...
        "$(INTDIR)\apr_xml.obj" \
        "$(INTDIR)\apr_xml_expat.obj" \

Then it should build decently.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message