List global variables in a C program
ctags -R -x --sort=yes --c-kinds=v --file-scope=no file "c:\my sources" > c:\ctagop.txt
If you happen to compile the file on most unixes you have nm
that just lists you all linker symbols. These symbols are classified in different groups (a bit platform dependent) so you should easily find out which the variables are.
Try ctags. Or, gcc with -aux-info
. There is also gccxml and libclang but those two aren't very simple.