[Qgis-developer] Re: Xcode - compile error, doc questions
William Kyngesburye
woklist at kyngchaos.com
Sun Feb 8 22:37:58 EST 2009
On Feb 8, 2009, at 7:06 PM, William Kyngesburye wrote:
>> Odd that it compiles fine outside of Xcode.
>>>
>
> That error is common to all the sources I mentioned. I didn't
> mention some other errors that are also from plugingui.cpp:
>
> /Users/Shared/src/qgis/qgis_1.0.0/mac/Qgis/../../src/plugins/
> north_arrow/plugingui.cpp: In constructor
> 'QgsNorthArrowPluginGui::QgsNorthArrowPluginGui(QWidget*,
> Qt::WFlags)':
> /Users/Shared/src/qgis/qgis_1.0.0/mac/Qgis/../../src/plugins/
> north_arrow/plugingui.cpp:24: error: 'setupUi' was not declared in
> this scope
> /Users/Shared/src/qgis/qgis_1.0.0/mac/Qgis/../../src/plugins/
> north_arrow/plugingui.cpp:26: error: 'tabNorthArrowOptions' was not
> declared in this scope
>
> ... and more
>
> I figured these were just a byproduct of the first error, but they
> might help. It's almost like ui_pluginguibase.h isn't getting
> included properly...
>
>>
Ahhhh... rrgghh! Some weird Xcode magic going on here. Xcode makes
use of header map (.hmap) files to locate intermediate and target
headers, in addition to standard -I flags you may add to a target.
One of these hmaps that is included in every target (!) is the
location of ALL headers in the whole project. hmap flags are all
before the target defined header paths, so they are searched first.
Since many/most of the plugins use the same source file names, from
the plugin template, there is confusion. And for just this target, it
was finding the ui_pluginguibase.h from the copyrightlabel plugin first.
I expect there will be more problems on a complete rebuild. I was
building targets for each plugin before creating the target for the
next, so early plugins don't have ui headers from later plugins in
their hmaps yet.
Possible solutions:
- rename plugin headers to include the plugin name. A big change in
the source layout. But a test with the current northarrow plugin ui
header worked.
- find an Xcode option to NOT include the all-project headers. I'll
dig around. I may try that cmake xcode generator to see if it has any
hints.
- add headers to the target, then they'll be added to the target hmap,
which is searched before all others. This did not work.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Time is an illusion - lunchtime doubly so."
- Ford Prefect
More information about the Qgis-developer
mailing list