To build your own C library, create a source code file full of functions for the library, compile to object code, then archive the object code into a library file. Ensure that a header file is created to prototype the library's functions. You can compile and link the library in the same directory, or copy it to the /usr/local/include directory.
- [Instructor] If you can code your own programs, … you can write your own C libraries. … Its not that difficult providing that you know a few … incantations in these steps. … Number one, write one or more source code files … for the functions you need. … Two, compile the source code into object code, … and three, create an archive of the object code file. … The archive becomes the library which you can then link … into other programs as you see fit. … Now, when you write the source code, … you don't need a main function. … Just write the functions to include in the library. … Create a header file for the library, … one that prototypes the functions, … declares constants, type defs, and so on, … and to compile the source code in the object code … without creating a program, you add … the dash little c compiler switch. … To create the archive, you use the command line utility ar. … Follow ar with the switches rcs and then the name … of the library in the format libname.a … Name becomes the name of the library. …
- Finding, installing, and linking libraries
- Accessing and generating XML data
- Working with JSON
- Working with the libcurl library
- Text programming
- Reading, writing, and manipulating JPEG images
- Working with PNG images
Skill Level Advanced
1. Setup and Configuration
2. Data Structures
3. Web Access
4. Text Programming
5. Computer Graphics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.