NO

Author Topic: #include too deeply nested  (Read 7050 times)

stachel

  • Guest
#include too deeply nested
« on: November 01, 2010, 01:31:41 PM »
Poide 6.50.4 terminates if i try to save a project with  *#include too deeply nested* error.

Here an example:

Code: [Select]
// main.c
#include "file1.h"

int main(void)
{
    return 0;
}

Code: [Select]
// file1.h
#include "file2.h"

Code: [Select]
// file2.h
#include "file1.h"



Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: #include too deeply nested
« Reply #1 on: November 01, 2010, 02:17:20 PM »
Your header files result in an endless loop.
You should never do this.
There is a pragma to include each file only once, which can be used to correct this problem.

It is still recommended to avoid circular references, which is what you have created.
---
Stefan

Proud member of the UltraDefrag Development Team

stachel

  • Guest
Re: #include too deeply nested
« Reply #2 on: November 01, 2010, 07:15:06 PM »
Maybe i expressed my self  not clearly.
IDE terminates if i push the *save* button. In version 5.0 it was ok.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: #include too deeply nested
« Reply #3 on: November 01, 2010, 07:28:38 PM »
Or Project -> Update all depedencies
May the source be with you