Build Order Problem with Xcode 1.5, Lex, and Yacc
Build Order Problem with Xcode 1.5, Lex, and Yacc
- Subject: Build Order Problem with Xcode 1.5, Lex, and Yacc
- From: Michael Tsai <email@hidden>
- Date: Mon, 6 Sep 2004 12:49:07 -0400
When I updated to Xcode 1.5, my project stopped building. I use lex and
yacc with Objective-C, and so I have a .lm file and a .ym file in my
(native) target. When I try to build, Xcode reports an error when using
lex. The *.tab.h file has not been generated yet, and so (a) gcc can't
#import it from the .lm file, and (b) the constants therein are
undefined.
I tried making a small test project using .lm and .ym files, and
encountered the same problem. A test project using a .l and a .y file
worked. So I tried renaming the files in my big project to .l and .y
and telling Xcode to compile everything as Objective-C (this seemed to
be the only way to set the language for the derived sources). Once
again, however, it tried to compile the lex output before running yacc.
So far, the only way I can make it work with my full project is to
create a shell script build phase that uses yacc to generate the
*.tab.h file in the DerivedSources folder before the rest of the files
are compiled. Xcode 1.5 is supposed to have *improved* support for
lex/yacc. How can I take advantage of that?
--Michael
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.