Re: How to include the header files effectively
| От | Alvaro Herrera |
|---|---|
| Тема | Re: How to include the header files effectively |
| Дата | |
| Msg-id | 20190412022256.GA32225@alvherre.pgsql обсуждение исходный текст |
| Ответ на | How to include the header files effectively (Andy Fan <zhihui.fan1213@gmail.com>) |
| Ответы |
Re: How to include the header files effectively
|
| Список | pgsql-hackers |
On 2019-Apr-12, Andy Fan wrote: > for example, when I want the LOCKTAG in .c file, which is defined in > "storage/lock.h". then I wrote the code like this: > > #include "storage/lock.h" > ... > > /../../../src/include/storage/lockdefs.h:50:2: error: unknown type name > 'TransactionId' > TransactionId xid; /* xid of holder of AccessExclusiveLock */ What are you trying to do? Your .c file must include "postgres.h" before any other header file. There should be no other dependencies. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: