LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2019, 12:01 AM   #1
Yuc
Member
 
Registered: Nov 2018
Posts: 38

Rep: Reputation: Disabled
What's the meaning of "undefined names"? see the details in the attached picture.


I can't understand the sentence :The C compiler uses a
predefined library of functions (the C library) that have the names of the system
calls, thus resolving the system call references in the user program to what would
otherwise be undefined names.


This is my understanding part of it: the c library has some functions that are with the same names of system calls but I can't understand the behind part of it. What's the meaning of "undefined names"? Does it mean system calls that don't have names?

I'm really sorry for if it is a problem of my english.

thank you.
Attached Thumbnails
Click image for larger version

Name:	Capture214.PNG
Views:	30
Size:	131.7 KB
ID:	29858  
 
Old 02-19-2019, 06:15 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,881
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
It is just pointing out that the libraries installed contain system functions that you call as part of a module or program.

Do you have any programming experience, or have you ever looked at, and compile any C programs?
 
2 members found this post helpful.
Old 02-19-2019, 01:16 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
What book is that picture from?
 
Old 02-19-2019, 01:45 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
to add to what @rtmistler said,

therefore, if you make a "system call", or otherwise, and there is nothing to reference it, (the function call) to, then logic states, it is undefined, and will tell you so. example

Code:
#include <stdio.h>
int main (void)
{

gofunny();

return 0;
}

// output
$ gcc  udef.c
udef.c: In function ‘main’:
udef.c:9:1: warning: implicit declaration of function ‘gofunny’ [-Wimplicit-function-declaration]
 gofunny();
 ^~~~~~~
/usr/bin/ld: /tmp/ccJfv1JF.o: in function `main':
udef.c:(.text+0xa): undefined reference to `gofunny'
collect2: error: ld returned 1 exit status
The header files are where the functions are defined. Keep reading...

Last edited by BW-userx; 02-19-2019 at 01:56 PM.
 
1 members found this post helpful.
Old 02-19-2019, 01:50 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
It says, "The C library used by the compiler defines these system calls. If it did not they would be (otherwise) undefined."

It would be helpful when asking questions in the context of some external documentation, to include the name of that documentation or a link to the source so that others might better understand the context of the question.
 
1 members found this post helpful.
Old 02-19-2019, 07:48 PM   #6
Yuc
Member
 
Registered: Nov 2018
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
It is just pointing out that the libraries installed contain system functions that you call as part of a module or program.

Do you have any programming experience, or have you ever looked at, and compile any C programs?
Yes,but a little. Thank you for the help.
 
Old 02-19-2019, 07:50 PM   #7
Yuc
Member
 
Registered: Nov 2018
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
What book is that picture from?
it's the book <the design of the unix operating system>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] glxgears, fgl_glxgears run, but no "picture" or "stagnant" picture almcneill Linux - Software 1 01-27-2013 12:45 AM
What is the meaning of ".d" in linux directory names? hq4ever Linux - Server 1 03-19-2007 01:01 PM
pl2303 attached to ttyUSB0 but driver attached to device is "serial" sheeluh Linux - Software 4 03-12-2007 04:27 AM
How can I say mouse is attached or not attached at the serial port ? lovelylinux Linux - Hardware 1 02-07-2007 09:44 AM
Serial Mouse is attached or not attached at seiral port lovelylinux Linux - Hardware 1 01-28-2007 07:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration