Ok team, here's the long story short why we can't employ the free flavor of the Visual C++ compiler. Please correct me if I'm wrong.
The Visual C++ Toolkit 2003 ships with a subset of the includes and libs that a full product would ship with. Because this is pretty basic code, that isn't generally a problem for the code we compile. However, the missing DelayImp.lib causes mod_aspdotnet a huge problem. In order, for example, for the gacutil or regasm utilities to process an assembly, these utilities attempt to load them. Because the .dll files libapr.dll, libaprutil.dll, and libhttpd.dll are all in the installed Apache directory, and Apache.Web.dll starts its life in the build tree then moves to the global assembly cache tree, this is an impossible hurdle. We don't want to maintain two sets of the httpd.dll files. And we cannot locate Apache.Web.dll in the installed httpd tree. Registering this assembly by reference in an external tree allows .NET to load it, but the ASP.NET loader won't load a System.Web.Host provider assembly from a location outside of the GAC. So instead, I PATH'ed the apacheroot\bin directory to get around this for the moment. I then successfully compile the Apache.Web.dll assembly, but including comdef.h brings in comutil.h - and comutil.h isn't distributed in the Platform SDK for Windows XP SP2, although they include comdef.h (?). So we get the assemblies but not the httpd module to build. Attached is the .bat file I was working on to try building with the free tools. Anyone who wants to invest more effort has my blessings and everyone's appreciation. Remember you need to run the envvar/setenv/vcvars32 for each of the elements: * Windows Platform SDK * .NET Framework SDK * Visual C++ Toolkit Bill At 02:30 PM 8/9/2004, William A. Rowe, Jr. wrote: >Jeff, > > The essential problem is that there is no make distributed with >that compiler, so I don't see folks building httpd with it any time >soon. A most unfortunate omission. > > On the other hand, simple modules (even mod_aspdotnet and >the corresponding apache.web.cpp files), or apxs, could easily >use the free compiler. > > I'm working on an alternate build for mod_aspdotnet to compile >with either the full dev studio or only the free compiler. Batch/shell >script is a generally lousy build environment, but for this case, I'm >thinking it's ideal :) > >Bill > >At 01:51 PM 8/9/2004, Jeff White wrote: > >>For Windows .NET Framework 1.1 >>and Windows Win32 usage: >> >>Any one ran _any_ compile tests for >>usage in Apache Windows Win32 >>development? >> >>July 2004 >> >><quote> >> >>The Microsoft Visual C++ Toolkit 2003 >>includes the core tools developers need >>to compile and link C++-based applications >>for Windows and the .NET Common Language >>Runtime: >> >>Snip >> >>The Visual C++ Toolkit 2003, version 1.01 >>(released July 6, 2004) supplants version 1.0 >>(released April 16, 2004). Version 1.01 updates >>the included Visual C++ compiler to exactly >>match the compiler that ships with Visual Studio >>.NET 2003 (build 13.10.3077). In the initial 1.0 >>Toolkit release, the build numbers of the compilers >>differed slightly. Version 1.01 of the Toolkit also >>corrects some minor grammatical issues in the >>sample whitepapers and in the command prompt >>window. >> >></quote> >> >>The Microsoft Visual C++ Toolkit 2003 Home Page >>http://msdn.microsoft.com/visualc/vctoolkit2003/ >> >>Visual C++ Toolkit 2003 Download >>http://www.microsoft.com/downloads/details.aspx?FamilyID=272be09d-40bb-49fd-9cb0-4bfa122fa91b&displaylang=en >> >>Yes .NET Framework 1.0 and 1.1 can be >>used inside Apache Windows when loaded >>via a C++ Apache Windows module that >>loads .NET assemblies..... >> >>Jeff
@echo off echo In order to perform the build, adjust the path below and ensure you echo invoke the batch file with the proper environment variables for echo the Microsoft Visual C++ Toolkit 2003 and Microsoft .NET SDK set APACHE_PATH=c:\Program Files\Apache Group\Apache2 set PATH=%PATH%;%APACHE_PATH%\bin echo. echo Using APACHE_PATH to %APACHE_PATH% rem Pre-unregister an existing package, if we had built before; regasm /nologo /unregister "..\Release\Apache.Web.dll" > nul 2>&1 echo. echo Building Apache.Web Assemblies cd Apache.Web csc /nologo /w:4 /debug- /o+ /t:module /out:"..\Release\Apache.Web.Helpers.netmodule" Helpers\_gcA_gcA_gcString.cs if errorlevel 1 goto failed rem optimization not allowed: /O2 /Ob1 cl /nologo /EHac /I "%APACHE_PATH%\include" /AI "..\Release" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_WINDLL" /FD /MT /GS /Fo"..\Release\WorkerRequest.obj" /Fd"..\Release\Apache.Web_src.pdb" /W4 /clr /c WorkerRequest.cpp if errorlevel 1 goto failed cl /nologo /EHac /I "%APACHE_PATH%\include" /AI "..\Release" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_WINDLL" /FD /MT /GS /Fo"..\Release\AssemblyInfo.obj" /Fd"..\Release\Apache.Web_src.pdb" /W4 /clr /c AssemblyInfo.cpp if errorlevel 1 goto failed rem dropped DelayImp.lib /DELAYLOAD:"libapr.dll" /DELAYLOAD:"libaprutil.dll" /DELAYLOAD:"libhttpd.dll" link /nologo /OUT:"..\Release\Apache.Web.dll" /INCREMENTAL:NO /LIBPATH:"%APACHE_PATH%\lib" /DLL /MAP /OPT:REF libapr.lib libaprutil.lib libhttpd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\Release\AssemblyInfo.obj ..\Release\WorkerRequest.obj if errorlevel 1 goto failed cd .. echo. echo Registering and installing the assembly into the GAC cd Release regasm /nologo /tlb:"Apache.Web.tlb" "Apache.Web.dll" if errorlevel 1 goto failed gacutil /nologo /if "Apache.Web.dll" if errorlevel 1 goto failed cd .. echo. echo Building mod_aspdotnet.so cd mod rem optimization not allowed: /O2 /Ob1 cl /nologo /EHac /I "..\Apache.Web" /I "%APACHE_PATH%\include" /I "..\Release" /AI "..\Release" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_WINDLL" /FD /EHsc /MT /GS /Fo"..\Release\mod_aspdotnet.obj" /Fd"..\Release\mod_aspdotnet_src.pdb" /W4 /c /Zi mod_aspdotnet.cpp if errorlevel 1 goto failed link /OUT:"..\Release\mod_aspdotnet.so" /INCREMENTAL:NO /NOLOGO /LIBPATH:"%APACHE_PATH%\lib" /DLL /DEBUG /PDB:"..\Release\mod_aspdotnet.pdb" /OPT:REF libapr.lib libaprutil.lib libhttpd.lib mscoree.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\Release\mod_aspdotnet.obj if errorlevel 1 goto failed cd .. echo. echo Installing mod_aspdotnet.so copy /y Release\mod_aspdotnet.so "%APACHE_PATH%\modules\mod_aspdotnet.so" :failed