Where to find C source code on mac? [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I was looking through a programming textbook and saw a particular header i didn't recognize. Later I looked it up on the internet but I was wondering where the source code of C can be found on a macbook. Is it just in the compiler? (I use gcc) Please help.

If you have Apple development tools installed, it should be found in the most possible unixoid place: /usr/include/ctype.h - At least that's where it is on my Macbook with Xcode installed.

The source code to much of the OS/X operating system and utilities, including the C library can be found at http://opensource.apple.com/ .
The source for the current version of the C library is here: http://opensource.apple.com/source/Libc/Libc-1082.50.1/ .
For other packages installed via brew or macports, use the corresponding command to retrieve the source for the packages. Look at the man page to see how.
Note that the gcc command actually runs clang on recent versions of XCode under OS/X. Try gcc --version...

The newest (clang-based) versions of XCode seem not to use /usr/include. I eventually found the headers down in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include. (I created a symlink in /usr, for sanity's sake.)

Related

Is there any C compiler that does NOT come with an IDE? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am new in C programming, and I was searching the internet for a compiler (for Windows 10). The compilers I found all had a full IDE included, but I don't need the IDE (I have a code editor). Is there any C compiler that does not come with an IDE, or at least a way to download one without the IDE?
This is going to get closed, but anyway, you can use any linux based compiler such as gcc or clang.
Also, Visual c++ has a compiler that can be used at the command line. In fact, nearly all C compilers can be used at the command line.
I think Microsoft makes their compiler available for download free. Only the IDE costs money. The compiler itself runs by command and when you use the IDE it just runs the command in the background.
How to install gcc in Windows 10? (the easier way)
How to Install the Latest GCC on Windows
Installing GCC: Binaries
You should be able to install GCC without an editor. https://gcc.gnu.org/install/binaries.html
To install it, follow the tutorial here to use MinGW, or use this tutorial to use Cygwin.
On the other hand, you could just use an editor that includes support for GCC. It may already be built into your IDE.

Is there any IDE where I can debug C and Python codes simultaneously? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I want to build a system, in which I want to use both Python and C. Python will be used for GUI on wxPython module and C will be used to handle backend processes. I have some pre-built C functions which will be rearranged and sent to a C compiler as files by the GUI. After compilation is done, the resulting file will be given as an argument to another executable and run the executable.
I've tried to run some exe from inside Python. Now I'm looking for an IDE which supports working with both the languages simultaneously i.e. coding and debugging.
You could try using Eclipse. You can install Python and C/C++ on it.
There are many IDE where you can debug C and Python codes simultaneously. You can choose any form the list bellow
Eclipse
Visualstudio
Netbeans
Zeus Ide

Code completion for C code in TensorFlow [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am developing a custom Op for TensorFlow, using Ubuntu on virtual machine and either rmate to edit the code in local Atom installation on my Mac, or Emacs to edit it right on the virtual machine.
Is there a way to enable code completion suggestions for C code in TensorFlow?
There's no special support in TensorFlow for code completion, but there may be a specific solution for your editor. For example, this answer on SuperUser covers different approaches to C/C++ code completion in Emacs.
One way I've managed to get C++ auto-completion is to use the (experimental) TensorFlow CMake build to generate Visual Studio project files for the project, and then use Visual Studio to edit the code.

GUI for a GNU Debugger [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
am pretty excited with the GNU Debugger and a GUI called Insight as it has saved me A LOT OF time. Thus I am posting this question/answer for other newbies out there like me having problems with their C code looking for a visual way to see what's going on.
I am working on Linux Mint (Ubuntu) btw.
I highly recommend ddd especially if you have complex data structures to visualize.
Install Insight a GUI for GNU Project Debugger
Compile your source
Run the debugger
_
$ sudo apt-get install insight
$ gcc -g source.c -o application
$ insight
When developing for Windows using GCC. The best is to use Affinic Debugger GUI(GDB). it is newer design. it is similar and better than DDD. It also works for Linux and Mac
NetBeans has a nice front end for gdb. So does Eclipse.
Your are right that we load the executables, but when you are compiling you will need to compile with the debug flag (think is it -g in gcc, abit rusty on that ), that will insert the debugging information into the executable/obj files.
When developing for Windows using GCC (e.g. MinGW), I often found it painful to get a GUI for GDB working (And I have a disliking for Eclipse), but I'm really fond of the Code:Blocks IDE.

Is there any tool which can generate a report for a valid C program [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Is there any tool that can parse a valid C program and generate a report which contains list of functions, global variables, #define constants, local variables in each function, etc.
Doxygen does all of the above.
Try exuberant-ctags with the -x option and tell it to generate all of its kinds.
Exuberant CTAGS is the default ctags on many linux distros.
You might try: exuberant-ctags -x --c-kinds=cdefglmnpstuvx --language-force=c filename
will even work if filename doesn't have .c extension.
You can use exuberant-ctags --list-kinds=c to see the possible tags.
Under windows, the cygwin environment supports ctags. I'm not sure if there's a windows build that doesn't need cygwin.
There are a few tools, depending on what you want to do. I'm not sure what you mean by "report", things like lxr will do html etc. cross referenced links. But for a person to use to help understand some code, then ncc or cscope (the later of which is in most Linux distributions) also some of the IDEs have some of these features (like eclipse).
Older alternatives to cscope are ctags and etags.

Resources