User Profile
Collapse
-
Makefile with flags
Hi,
Small question regarding makefiles:
I want to add a new target: release
that will compile my driver with additional flag
(EXTRA_CFLAGS += -Drelease_flag)
how can i do that on this example:
KERNELPATH := /home/kernel-2.6.24/
.PHONY: all clean
EXTRA_CFLAGS += -Werror
EXTRA_CFLAGS += -I$(src)/dir1
EXTRA_CFLAGS += -I$(src)/dir2
all: modules... -
enum Question
Hi, a little Q:
typedef enum
{
NUM0 = 0,
NUM1 = 1,
NUM2 = 2,
NUM3 = 3,
} NUMBER;
NUMBER test=NUM0;
when i'm writing:
test++
i get an error, how can i do the ++ without the need to do casting like:
test=(NUMBER)(t est+1);
thanks -
Address increment
Hi,
When I take an address and increment it, it jumps to address+4 bytes..
for example
int * buffer = 0x100;
buffer++; // &buffer = 0x104
why? -
Structs in C
Hi,
I am trying to do the following:
I want that var2.var1 will have the array size=100Code:typedef struct _STRUCT1 { integer var1[SIZE]; } STRUCT1 typedef struct _STRUCT2 { STRUCT1 var2(100); STRUCT1 var3(200); } STRUCT2
and var3.var1 will have the array size=200;
is it posible, or must i do this:
...Code:typedef
No activity results to display
Show More
Leave a comment: