Re: Development with Eclipse - Wrong error messages in IDE

Поиск
Список
Период
Сортировка
От Jason Petersen
Тема Re: Development with Eclipse - Wrong error messages in IDE
Дата
Msg-id 643CEBC4-A664-43CB-94CD-B0A4E05C9CE2@citusdata.com
обсуждение исходный текст
Ответ на Development with Eclipse - Wrong error messages in IDE  (Peter Moser <pitiz29a@gmail.com>)
Ответы Re: Development with Eclipse - Wrong error messages in IDE  (Peter Moser <pitiz29a@gmail.com>)
Список pgsql-hackers
> On Feb 3, 2016, at 2:38 AM, Peter Moser <pitiz29a@gmail.com> wrote:
>
> Does anyone had similar problems? Do I have to configure Eclipse to understand the PG_RMGR macro or is there another
possibilityto teach Eclipse these macros? 

I just built 9.6 under Eclipse CDT to try this out and was able to open e.g. heapam.c without any error markers.

I added PostgreSQL as a “Makefile Project with Existing Code” after running ./configure from the command-line. After
that,I built the project from within Eclipse by adding the ‘all’ make target and running it. 

One setting I usually change: right-click the project, pick Properties, then drill down through C/C++ General ->
PreprocessorInclude Paths. In the Provider pane, there is an entry for “CDT GCC Build Output Parser”. I’m not sure if
thisis strictly necessary, but I set my “Container to keep discovered entries” setting to “File”. 

Basically, Eclipse scans the make output for -I flags, then notes all the includes used to build each file, so the
staticanalyzer, etc. can have more accurate information (it is crucial that the “Compiler command pattern” in this
windowbe a regex that will match the compiler binary you use, so if you have /usr/local/bin/gcc, and “gcc” is the
pattern,you are in for trouble). 

After running the build, Eclipse should now know what includes are used for each file and stop whining. If it ever
seemsto have problems, you can kick it by running a clean target, then all, then picking “Project -> C/C++ Index ->
Rebuild”(I think). 

--
Jason Petersen
Software Engineer | Citus Data
303.736.9255
jason@citusdata.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Using quicksort for every external sort run
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: PostgreSQL Audit Extension