David McMinn(deleted)
|
Re: How to handle a flex / bison parser in a QNX C/C++ project
|
David McMinn(deleted)
11/18/2013 12:19 PM
post106835
|
Re: How to handle a flex / bison parser in a QNX C/C++ project
Hi,
I recently had to figure this out for something else (State Machine Compiler) so thought I'd share what I did, although
it may not be useful to you since your post is > 1 month old. Maybe this isn't the best way to do it, but it was the
only reliable way I found.
I had to create a custom Builder (Project -> Properties -> Builders -> New) and then I used another makefile to specify
the translation from my source to C sources and headers. Apparently (after searching the WWW) it's a common thing to
have to do and people typically use Ant or integrate into the makefiles, although the awkwardness comes from Eclipse.
Later versions of the CDT have an easier way to set up external build commands. I then made it run in the list before "
QNX Builder" so that the sources would be available for the real build. The custom build settings were:
Main:
Location: ${system_path:make}
Working directory: ${project_loc}/src
Arguments: -fmakefile.smc ${build_type}
Refresh:
Refresh resources upon completion: checked
The project containing the selected resource: checked
Recusrsively include sub-folders: unchecked
Environment: Leave everything at default
Build Options:
Allocate Console: checked
Launch in background: unchecked
After a clean: checked
During manual builds: checked
During auto builds: unchecked
During a clean: checked
My custom makefile (makefile.smc) is as attached.
You could probably also figure a way to add it to the QNX Makefile (or common.mk) but I could not get it to reliably
translate into C source before the main build.
Hope that helps.
|
|
|