[sldev] Build errors(in XCode 2.5) with indra.y.h

Argent Stonecutter secret.argent at gmail.com
Sun Sep 30 10:02:08 PDT 2007


On 30-Sep-2007, at 11:10, Michael Miller wrote:
> I think a better question (might) be to check if #include
> "indra.y.hpp" works on other versions of Mac OSX/Linux/Unix.

Since the existing code works on other platforms, all the other  
include files in that directory end in .h, and since ".h" is the  
standard extension for include files, I would be gobsmacked if  
existing systems where that file is . In general, if working code  
breaks because the name of a generated file is different when you  
build it, then the change only applies to the environment you built  
it in. It should either be renamed by the build script (as suggested  
by Nicolaz) or in the source (as I suggested).

In the SCons man page, there's this note: "If $YACCFLAGS contains a - 
d option, SCons assumes that the call will also create a .h file (if  
the yacc source file ends in a .y suffix) or a .hpp file (if the yacc  
source file ends in a .yy suffix)". Looks like there has been a  
change in a recent version of yacc/bison or Apple has configured  
things differently to make it generate the .hpp file from a .y source.


Try adding this to SConstruct in the lex/yacc section (lines between  
----start---- and ----end----):

     ### Configure lex and yacc ###
     env.Append(YACCFLAGS = ["-v", "-d"])
     env.CFile(target=build_dir+'/lscript/lscript_compile/ 
indra.l.cpp', source='lscript/lscript_compile/indra.l')
     env.CFile(target=build_dir+'/lscript/lscript_compile/indra.y.c',  
source='lscript/lscript_compile/indra.y')
     env.Command(build_dir+'/lscript/lscript_compile/ 
indra.y.cpp',build_dir+'/lscript/lscript_compile/indra.y.c',
                         [Move('$TARGET','$SOURCE'),Delete(build_dir 
+'/lscript/lscript_compile/indra.y.output')])
----start----
     env.Command(build_dir+'/lscript/lscript_compile/ 
indra.y.h',build_dir+'/lscript/lscript_compile/indra.y.hpp',
                         [Move('$TARGET','$SOURCE')])
----end----

I will try and check it out, but according to the download window  
it's going to have to be some time this afternoon at the earliest.


More information about the SLDev mailing list