0

I have some structure defined look like below,

typedef struct {
  #include <foobar.h>
} foo_bar;

How can I force Source Insight to parse the content of foobar.h then expand to foo_bar structure like a normal structure definition.

Is there any idea or key-word to help me get more information to set configuration of SI or customize by myself? Please get me some hint if there is some clue in user manual.

isaac
  • 1
  • 1
  • 1
  • 2
  • Welcome to StackOverflow. Please take the tour stackoverflow.com/tour, learn asking good questions stackoverflow.com/help/how-to-ask, make a MCVE stackoverflow.com/help/mcve Show the content of your header. It is unlikely that you really need to use the `<>`for including, more likely `""` is what you want. Including a header inside a C construct is unusual. What keeps you from declaring the struct type completely inside your header? – Yunnosch Apr 13 '17 at 06:27
  • This structure is actually combined by many parts from different source include file. And in fact, foobar.h is just one of them. In real case, there might still have foobar2.h foobar3.h Different part maintain by different member. That's why I have this unusual structure. – isaac Apr 14 '17 at 09:33
  • And can you make an MCVE? – Yunnosch Apr 14 '17 at 10:11
  • The fact that the desired content of the struct comes from several headers is not requiring to include the headers inside the struct. So why do you? – Yunnosch Apr 14 '17 at 10:16
  • What made you choose `<>` over `""`? – Yunnosch Apr 14 '17 at 10:17
  • It means good luck to have the badge for taking the tour. – Yunnosch Apr 14 '17 at 10:18
  • Is it possible that source-insight gets confused by the include inside the struct? Did you try anything else? – Yunnosch Apr 14 '17 at 10:21
  • What did you try to change source-insights behaviour? What in the doucmentation seems to get closest to your goal? How did it then fail to satisfy you? – Yunnosch Apr 14 '17 at 10:23
  • Refer to below discussion, I changed my code to `""` rather than `<>` https://stackoverflow.com/q/21593/7860191 – isaac Aug 25 '21 at 08:43

0 Answers0