Fw: SSAX compilation issue under windows
"Oleg A. Paraschenko" <[email protected]> Thu, 27 Jan 2005 10:32:54 +0300
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Organization | xmlhack.ru |
| Message-ID | <[email protected]> |
Hello, I think the letter from the Bigloo maillist is of some interest. Forwarding it to here. -- Oleg Begin forwarded message: Date: Fri, 21 Jan 2005 01:33:02 +0100 From: "Yannis BRES" <Yannis-j/[email protected]> Cc: "'Samuel Lacas'" <[email protected]> Newsgroups: gmane.lisp.scheme.bigloo Subject: RE: SSAX compilation issue under windows Hi ! So, here is what I did in order to get a DLL from Kirill Lisovsky's SXML library. 1/ Update the Makefile so that .c files are kept and the example does not depend on the library (for I can't get it to compile and did not try to figure out what's wrong yet). 2/ make heap, make lib, make example 3/ Create under Visual Studio a new DLL project, retrieve some settings from other Bigloo projects, insert the file, etc. Here are the command-line options for compiling .c files, as reported by VS: /Od /I "..\Sources" /I "..\..\runtime\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "SXMLLIB_EXPORTS" /D "_WINDLL" /D "_MBCS" /Gm/RTC1 /MTd /Fo"..\Temp\Debug\sxml-lib - safe/" /Fd"..\Debug/cigloo.pdb" /W3/nologo /c /Wp64 /ZI /TC Pathes are relative to the Projects directory where all VS project files are stored (from http://www.yannis.bres.name/Bigloo, "Optional Visual Studio files"). In summary I have this folder layout: \Bigloo \autoconf \bdb \bde ... \sxml-lib \libs \serializer ... ... \VisualStudio ... \Debug ... \Projects ... \Sources ... As such, "..\Sources" contains the special bigloo_config.h file used to build the Windows distribution of Bigloo, "..\..\runtime\Include" is the regular Bigloo directory that contains bigloo.h, etc. Here are the command-line options for linking the DLL, as reported by VS: /OUT:"..\Debug/sxml-lib_s.dll" /INCREMENTAL /NOLOGO /DLL /DEBUG /PDB:"..\Debug/sxml-lib_s.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"..\Debug/sxml-lib_s.lib" /MACHINE:X86 ..\Debug\bigloo_s.lib 4/ Create another project for the example, linked against bigloo_s.lib and sxml-lib_s.lib. The example file starts correctly, although it then miserably fails: File "m:\Bigloo\sxml-lib\.\ssax\char-encoding.scm", line 39, character 1 335: # (define ascii->char integer->char) # ^ # *** ERROR:bigloo:<anonymous:1003:ssax/char-encoding.scm:39> # Type `long' expected, `_' provided -- #<???:00000000> I will investigate that later on, for now it is quite late ;-) Here are the SXML library Makefile modified as described as well as the VS projects file in case they may be of some use for you... Best regards, Yannis ====================================================================== http://www.yannis.bres.name +33 (6) 60 38 79 52 ====================================================================== -- Oleg Paraschenko olpa@ http://xmlhack.ru/ XML news in Russian
Makefile
(application/octet-stream, 5.7 KB) - not displayed
sxml-lib example - safe.vcproj
(text/plain, 3.3 KB)
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="sxml-lib example - safe"
ProjectGUID="{DACF5C52-D0D9-4207-BE26-F5F668128E9E}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Debug"
IntermediateDirectory="..\Temp\Debug\sxml-lib example - safe"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Sources;..\..\runtime\Include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(OutDir)/sxml-lib example - safe.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\bigloo_s.lib $(OutDir)\sxml-lib_s.lib"
OutputFile="$(OutDir)/sxml-lib example - safe.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/sxml-lib example - safe.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Release"
IntermediateDirectory="..\Temp\Release\sxml-lib example - safe"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\Sources;..\..\runtime\Include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(OutDir)/sxml-lib example - safe.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\bigloo_s.lib $(OutDir)\sxml-lib_s.lib"
OutputFile="$(OutDir)/sxml-lib example - safe.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\..\sxml-lib\example.c">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
sxml-lib.vcproj
(text/plain, 4.9 KB)
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="sxml-lib - safe"
ProjectGUID="{F149AB7E-5132-407D-9754-701CEFB84573}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Debug"
IntermediateDirectory="..\Temp\Debug\sxml-lib - safe"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Sources;..\..\runtime\Include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SXMLLIB_EXPORTS"
MinimalRebuild="TRUE"
ExceptionHandling="FALSE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(OutDir)/cigloo.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\bigloo_s.lib"
OutputFile="$(OutDir)/sxml-lib_s.dll"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/sxml-lib_s.pdb"
SubSystem="2"
ImportLibrary="$(OutDir)/sxml-lib_s.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Release"
IntermediateDirectory="..\Temp\Release\sxml-lib - safe"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\Sources;..\..\runtime\Include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SXMLLIB_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\bigloo_s.lib"
OutputFile="$(OutDir)/sxml-lib.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/sxml-lib.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="libs"
Filter="">
<File
RelativePath="..\..\sxml-lib\libs\input-parse.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\libmisc.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\look-for-str.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\srfi-13-local.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\util.c">
</File>
<Filter
Name="bigloo"
Filter="">
<File
RelativePath="..\..\sxml-lib\libs\bigloo\common.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\bigloo\myenv-bigloo.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\bigloo\parse-error.c">
</File>
<File
RelativePath="..\..\sxml-lib\libs\bigloo\srfi-12.c">
</File>
</Filter>
</Filter>
<Filter
Name="serializer"
Filter="">
<File
RelativePath="..\..\sxml-lib\serializer\html-serializer.c">
</File>
</Filter>
<Filter
Name="ssax"
Filter="">
<File
RelativePath="..\..\sxml-lib\ssax\char-encoding.c">
</File>
<File
RelativePath="..\..\sxml-lib\ssax\SSAX-code.c">
</File>
</Filter>
<Filter
Name="stx"
Filter="">
<File
RelativePath="..\..\sxml-lib\stx\stx-engine.c">
</File>
</Filter>
<Filter
Name="sxml"
Filter="">
<File
RelativePath="..\..\sxml-lib\sxml\sxml-tools.c">
</File>
<File
RelativePath="..\..\sxml-lib\sxml\sxpath.c">
</File>
<File
RelativePath="..\..\sxml-lib\sxml\sxpathlib.c">
</File>
</Filter>
<Filter
Name="sxpath"
Filter="">
<File
RelativePath="..\..\sxml-lib\sxpath\sxpath-ext.c">
</File>
<File
RelativePath="..\..\sxml-lib\sxpath\txpath.c">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>