From the course: Exploring C Libraries

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Linking a library: Command prompt

Linking a library: Command prompt - C Tutorial

From the course: Exploring C Libraries

Start my 1-month free trial

Linking a library: Command prompt

- [Instructor] The C language's native environment is the command prompt found in a terminal window these days. It's a natural way to compile code and link-specific libraries, especially for the program examples in this course. For Linux and the Mac, you can use a terminal window to compile and run sample C programs. In Windows 10, install the Ubuntu Linux shell. Once a package manager has installed the desired library, the next step is to run a test program that ensures everything works. Typically, in the test program, I display the library's version number. Here in the Ubuntu Linux shell in Windows 10, I've used the advanced package manager tool to install the lib jpeg library. The header file is named jpeglib.h. Now, I'll list the contents of this header file to find the version number defined constant. And we'll scroll down a few screens. There it is. Near the bottom, JPEG_LIB_VERSION is the defined constant name…

Contents