Fix C++ sleighexample

* We need to link to zlib now

* The method for loading compiled sleigh files has changed
This commit is contained in:
Eric Kilmer 2024-03-04 11:20:45 -05:00
parent 317a881488
commit b739e21073
No known key found for this signature in database
GPG key ID: 504CA431CF70054B

View file

@ -315,12 +315,12 @@ int main(int argc,char **argv)
ContextInternal context; ContextInternal context;
// Set up the assembler/pcode-translator // Set up the assembler/pcode-translator
string sleighfilename = "specfiles/x86.sla"; istringstream sleighfilename("<sleigh>specfiles/x86.sla</sleigh>");
Sleigh trans(&loader,&context); Sleigh trans(&loader,&context);
// Read sleigh file into DOM // Read sleigh file into DOM
DocumentStorage docstorage; DocumentStorage docstorage;
Element *sleighroot = docstorage.openDocument(sleighfilename)->getRoot(); Element *sleighroot = docstorage.parseDocument(sleighfilename)->getRoot();
docstorage.registerTag(sleighroot); docstorage.registerTag(sleighroot);
trans.initialize(docstorage); // Initialize the translator trans.initialize(docstorage); // Initialize the translator
@ -356,7 +356,7 @@ int main(int argc,char **argv)
--# libraries --# libraries
--INCLUDES=-I./src --INCLUDES=-I./src
-- --
--LNK=src/libsla.a --LNK=src/libsla.a -lz
-- --
--libsla.a: --libsla.a:
-- $(MAKE) -C src/ $@ -- $(MAKE) -C src/ $@