I have a recursive make structure (i.e. make calls the makefiles in subdirectories). I am in the process of generalizing this and so I made a target called subdirs as follows:
subdirs:
...
Type: Posts; User: chacham15
I have a recursive make structure (i.e. make calls the makefiles in subdirectories). I am in the process of generalizing this and so I made a target called subdirs as follows:
subdirs:
...
Yes, that does work, but then its a pain to move a file..which happens surprisingly often. Any other ideas?
Thanks,
chacham15
Oh, I want to see the compile command because that way, Im sure that the file has been recompiled. I dont completely trust that the makefile is without flaws yet.
Yes, but they are often hard to find. Compare finding the warning in this set with the one after it.
gcc -c -I ../../src str.c
gcc -c -I ../../src bmp.c
gcc -c -I ../../src hashtable.c
gcc -c...
what I want to see is something like:
gcc -c -I ../../src str.c
gcc -c -I ../../src bmp.c
gcc -c -I ../../src hashtable.c
gcc -c -I ../../src linkedlist.c
gcc -c -I ../../src threads.c
gcc -c...
>The -I option to the compiler needs to be exactly the directory that you want to include files from
Yes, I know. That is why I was hoping that there would be some other option that would tell gcc...
I have a directory structure somewhat like the whats below with many more levels and many more source and header files. In all the source files, the headers are included with "String.h" regardless of...
Oddly enough, it works on Vista... (maybe thats because UAC is off). All that Im doing is overwriting the function call with NOPs. Those other methods dont work because, they A. require templating,...
Longjump can return me to my code from that. Does it just remember the register state and restore it? So does this mean that functions with this option cannot return? Because if they can, then...
Thanks Salem. matsp the reason that I dont want to write 8 different functions (although youre right that I could) is for maintainability purposes. For each new switch that occurs the number of...
slingerland3g, you are right. I changed the size to 8000, which is wayy too large and it at least now prints out "About to call p". What should size be set to? I tried to use the labels to measure...
Heres what I have so far
void p(){
printf("Called.\n");
}
void *start;
void *end;
So, I have an application which is VERY processor intensive. This application has a core which is general enough to work for all intended purposes. However, becuase of this generality, in certain...
How would I then unwind the stack to get my trace?
Thanks!
chacham15
The stack is layed out in the following manner:
Base Pointer
Return Address
Stack Variables
So, yes. The interesting thing to note is that when I try to run the getStackTrace function from...
How would you implement getting a stack trace from inside the signal handler? I've tried getting the base pointer then adding sizeof(void*) to get the return address and repeating but all I get are...
I mostly do it for the experience. I feel that if you know how the tools you use work then you'll be able to use them better. Also, architecting complicated systems is fun.
>So you want some kind of 'throw' from C code, which will become a C++ exception later on?
As a future goal, yes. But for now, i want it for some more mundane things:
For example,
BOOL...
>And it would be a compiler error, too. That's why setjmp was invented. (Please don't use it. It's worse than goto.)
haha, cool. I dont think his compiler errored, perhaps he did the goto in...
> It's not a pointer when you use it with sizeof - it's more than semantics!
sizeof isnt a real function!!!
> It's a unique operator in that it uses a sequence of characters (sizeof) rather...
Yes, in the first example if you wanted you'd do an explicit cast. This, however, isnt necessary as the compiler will guess at what you mean. This fits in with the entire theme, rules are meant to be...
>You can CERTAINLY create a 2D, 3D or 4D array:
Its only in your mind that that array can exist in more than one dimension, the compiler translates any higher dimensions into a single dimensions...
Bzzt - wrong, no it isn't.
Wow. Just wow. What you are missing is that sizeof is a preprocessor directive. That means that in the function all the preprocessor knows is that the argument is a int*...
What the heck? Where did my post go? Anyways, since the macro makes use of variables which are defined locally in the used function it will work as expected. The reason is that a macro is a search...
The thing is that if I wanted to use a library, I'd be writing in C++ which is more suited for doing this kind of thing. I want to write my own version of this (as I have for printing out stack...