Imagix 4D User Guide
If you see an analyzer message that says `cannot open file', the most likely cause is that the directory containing the include file hasn't been specified. Determine where the included file is actually located, and thus what directory should be included through a -I switch.
If the analyzer is finding the include files, but you're still getting a lot of error messages, such as `unknown type foo near symbol bar', the problem is likely to be incompletely or inaccurately specified -D and -U flags.
The most typical errors occur because required types are unknown, as their typedefs occurred in sections of header files that were passed over because of how the -D and -U flags were specified. First, examine the code where the analysis problem was reported, by opening the file (MOUSE [Double-Left]) from the appropriate message in the Analysis Results window). Determine if there are required types that are unknown (you can use Symbol Index or Database Lookup tabs to help with this). If they are unknown, determine where the type should have been defined. You can use the Grep Tool tab to help with this. Determine what set of macro definitions would have been necessary to cause this code to be analyzed.
Alternatively, you can have the Analysis Results window collect much of this data for you. Select (MOUSE [Left]) the line in the Analysis Results window to select a specific error message. Then switch to the error analysis view (LOCAL MENU Display > Show Error Analysis). This will automatically generate much of the data described in the previous paragraph. You'll still need to determine what changes to make to the macro definitions.
Note: The Imagix 4D analyzer will produce error messages that you might not get with lexical parsers. This is because the Imagix 4D analyzer does full semantic parsing, like a compiler, in order to extract more complete and accurate data from your source files. However, unlike a compiler, the Imagix 4D analyzer has built-in error correction. After encountering a parsing problem, Imagix 4D resynchronizes to your source code, and reports which lines had to be skipped while it was resynchronizing. So as you review analysis results to determine whether the parsing issues were significant, take into consideration how many lines were ignored.
Otherwise, add the additional -I and -D flags to the list of other preprocessor flags. Under the add target to makefile approach, you now need to work in the makefile itself and modify IMAGIX_FLAGS that is defined there.
For the other approaches, you'll continue to work in the Data Sources dialog; you may need reopen it via MENU Project > Data Sources. For the dialog-based approach, make the necessary changes on the Source Files or Include Dirs tab.
Under the extract from makelog approach, you'll need to decide whether the problem results from the makelog itself or from the processing of the makelog. If generating a new makelog or changing the processing rules can't fix the problem, there are a couple of workarounds to consider. The first is to add flags to the Options field on the Makelog tab; in this case the flags will be propagated to each of the Dialog-Based (C/C++) data sources when they are next generated. The second is to modify just certain of the Dialog-Based (C/C++) data sources that have already been generated. Generally, this second workaround is discouraged; any changes you make to specific Dialog-Based (C/C++) data sources will be lost the next time you process the makelog (step 5h), which you'll need to do if you change or regenerate the makelog, change the processing rules, or add flags to the Options field.