Den mån 10 juni 2024 kl 10:55 skrev Jun Omae <jun6...@gmail.com>: > Hi, > > On Mon, Jun 10, 2024 at 5:32 AM Daniel Sahlberg > <daniel.l.sahlb...@gmail.com> wrote: > > [[[ > > link.exe /nologo /debug /subsystem:console /incremental:no > /out:"LibR\testall.exe" LibR\testutil.obj LibR\testtime.obj > LibR\teststr.obj LibR\testvsn.obj LibR\testipsub.obj LibR\testmmap.obj > LibR\testud.obj LibR\testtable.obj LibR\testsleep.obj LibR\testpools.obj > LibR\testfmt.obj LibR\testfile.obj LibR\testdir.obj LibR\testfileinfo.obj > LibR\testrand.obj LibR\testdso.obj LibR\testoc.obj LibR\testdup.obj > LibR\testsockets.obj LibR\testproc.obj LibR\testpoll.obj LibR\testlock.obj > LibR\testsockopt.obj LibR\testpipe.obj LibR\testthread.obj > LibR\testhash.obj LibR\testargs.obj LibR\testnames.obj LibR\testuser.obj > LibR\testpath.obj LibR\testenv.obj LibR\testprocmutex.obj > LibR\testfnmatch.obj LibR\testatomic.obj LibR\testflock.obj > LibR\testshm.obj LibR\testsock.obj LibR\testglobalmutex.obj > LibR\teststrnatcmp.obj LibR\testfilecopy.obj LibR\testtemp.obj > LibR\testlfs.obj LibR\testcond.obj LibR\testescape.obj > LibR\testskiplist.obj LibR\testencode.obj LibR\abts.obj ..\LibR\apr-1.lib > kernel32.lib advapi32.lib ws2_32.lib wsock32.lib ole32.lib shell32.lib > rpcrt4.lib > > testutil.obj : error LNK2019: unresolved external symbol > __imp__CrtSetReportFile referenced in function initialize > > testutil.obj : error LNK2019: unresolved external symbol > __imp__CrtSetReportMode referenced in function initialize > > LibR\testall.exe : fatal error LNK1120: 2 unresolved externals > > NMAKE : fatal error U1077: 'link.exe /nologo /debug /subsystem:console > /incremental:no /out:"LibR\testall.exe" LibR\testutil.obj LibR\testtime.obj > LibR\teststr.obj LibR\testvsn.obj LibR\testipsub.obj LibR\testmmap.obj > LibR\testud.obj LibR\testtable.obj LibR\testsleep.obj LibR\testpools.obj > LibR\testfmt.obj LibR\testfile.obj LibR\testdir.obj LibR\testfileinfo.obj > LibR\testrand.obj LibR\testdso.obj LibR\testoc.obj LibR\testdup.obj > LibR\testsockets.obj LibR\testproc.obj LibR\testpoll.obj LibR\testlock.obj > LibR\testsockopt.obj LibR\testpipe.obj LibR\testthread.obj > LibR\testhash.obj LibR\testargs.obj LibR\testnames.obj LibR\testuser.obj > LibR\testpath.obj LibR\testenv.obj LibR\testprocmutex.obj > LibR\testfnmatch.obj LibR\testatomic.obj LibR\testflock.obj > LibR\testshm.obj LibR\testsock.obj LibR\testglobalmutex.obj > LibR\teststrnatcmp.obj LibR\testfilecopy.obj LibR\testtemp.obj > LibR\testlfs.obj LibR\testcond.obj LibR\testescape.obj > LibR\testskiplist.obj LibR\testencode.obj LibR\abts.obj ..\LibR\apr-1.lib > kernel32.lib advapi32.lib ws2_32.lib wsock32.lib ole32.lib shell32.lib > rpcrt4.lib' : return code '0x460' > > Stop. > > ]]] > > > > I'm surely doing something wrong here... appreciating any advice and/or > pointers! > > _CrtSetReportFile and _CrtSetReportMode routines are available only > for debug versions. So that /MDd flag should be passed but not in > test/Makefile.win. See attached patch. >
Thanks Jun, unfortunately the patch didn't make any difference. In the end it turned out that I needed to specify ARCH="x64 Release" on the command line. I found this by reading the comments in Makefile.win. > > Of course, you can use cmake to build apr on Windows. I use cmake to > build apr, apr-util and httpd as dependencies of subversion on > Windows. > I also tried this, since my longterm goal is to build Subversion, where there is some work going on to add a cmake based build system. It seems there are at least four different options, with the documentation in various stage of completeness: * .DSW files * Makefile.win * CMake * vcpkg I guess what I'm trying to say is that the bar to get started with APR is relatively high. Please don't take this as complaints - I'd be happy to help in any way I can to improve the documentation. Kind regards, Daniel