lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] std includes


From: timmy brolin
Subject: Re: [lwip-users] std includes
Date: Wed, 13 Jul 2011 23:46:27 -0700

I am using GCC, so nothing too strange there.

The problem is a conflict between some library header files and the RTOS I am using.
The library header files assume that "DEBUG" is defined to "0" or "1" by the IDE.
The RTOS on the other hand works with DEBUG being defined or undefined.

So for example, this inclusion order works:
#include <string.h>
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/mem.h"
...
In the inclusion order above, DEBUG will be defined to 0 or 1 by the IDE, making the libary headers happy. Later the RTOS headers (included from opt.h) will redefine or undefine DEBUG to make the RTOS happy.

But this inclusion order does not work:
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/mem.h"
...
#include <string.h>
...
Because now the RTOS header will have redefined/undefined DEBUG before the library headers are included, and I get compilation errors.

Not a big deal. It is just some extra adaptation work for me when updating lwIP to new version.

Regards,
Timmy Brolin



<-----Ursprungligt Meddelande----->
  From: Andrew Foster address@hidden
Sent: 13/7/2011 9:45:17 PM
To: address@hidden
Subject: Re: [lwip-users] std includes 


Tommy,

Just out of curiosity, what compiler are you using?

Are you using an IDE or your own series of make files?

Are you sure you don't have a project/make file error that is causing
your compiler to wig out on the std includes.


Sorry if I'm pointing to things you've already ruled out. My simple mind
tries to rule out the obvious causes first. The source of 99.9% of my
compiler errors are usually found between my keyboard and chair.


Andrew



_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
.

_______________________________________________________________
Hitta ditt drömjobb - Turism Försäljning Vårdjobb Ekonomi Design Bank Media


reply via email to

[Prev in Thread] Current Thread [Next in Thread]