'no such file' for execinfo.h for Windows 7 + GCC + Codeblocks

Hi,

I am trying to make a stack trace library. I saw some answers using execinfo.h, but when i try tu run, i get an error:

error: execinfo.h: No such file or directory

I am using Windows 7 + Codeblocks + GCC, I am looking for a way to include execinfo.h or any alternative, but didnt found any good answer on web. Can anyone help?

I just want stack trace in my code, a library could also help me.
That header file is not from the Windows SDK, so it has to be provided elsewhere. By Googling the header name (you should try Google, by the way), I found what it seems to be the missing header file (http://www.scs.stanford.edu/histar/src/uinc/execinfo.h ), but as you can see it is several externs. This header file alone doesn't cut it. You need a LIB file (and related DLL if the LIB is for dynamic linking) in order to link, or you need those function definitions and compile them directly in your code.
Thanks for the answer, webjose. I did googled , by the way, before posting here. I wonder why you thought I didnt.

I've already read dozens of sites, most explain how to do stack trace for linux and Mac, others just keep saying execinfo and stack trace are platform specific. Others teach some dirty stack trace which you have to program it through all your code. None solved my problem. I looked for libraries to do the job, but didn't found any.

I still need to know an alternative or a lib for execinfo.h for windows, or a stack trace lib.
Well, I googled for some 10 minutes and I cannot find a downloadable library related to this header file, which leads me to believe it is more a proposed header for functions that need implementation. See http://mail-index.netbsd.org/tech-userlevel/2012/01/25/msg006026.html for example. The guy wrote an implemenation of the functions as per the document he/she mentions there, and the TAR file is still available for download.

But look at the response he/she received: I don't know about the topic, but apparently the code is rather useless because it doesn't work in modern OS's.

As per the suggestion given to that person, unwind.h should be a better one.
God, thats frustrating :(

C++ is on the market more time than my age. I cant believe no one made yet something as basic and essential as a stack trace. Am I being picky? I can't believe just I am feeling need of it.

Maybe I didn't figured out the proper way to debug in C++. I guess will start another article about it.
C++ is on the market more time than my age.I cant believe no one made yet something as basic and essential as a stack trace.
You don't have to believe it, it's not true.

Windows has debugging built in, and there's an API for accessing it. You're using Windows, why not use that?
http://msdn.microsoft.com/en-us/library/ms809754.aspx
Topic archived. No new replies allowed.