LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2009, 03:25 AM   #1
supravat
LQ Newbie
 
Registered: Jun 2009
Posts: 21

Rep: Reputation: 15
Arrow C/c++ help


I'm using Ubuntu 9.04. Can any one tell me how to see the manual or help of C/C++ functions or libraries in Linux. I tried the following..

$ man malloc

but it shows no manual entry.

Please help me.
 
Old 09-06-2009, 04:39 AM   #2
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Can you say more clearly about what you're trying to do?

Anyway there will be no manual entry. Google it and you'll find

goodluck
 
Old 09-06-2009, 04:43 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You might also try "apt-get install manpages-dev"

This link suggestions all of the following:
http://ubuntuforums.org/archive/index.php/t-291651.html

Quote:
sudo apt-get install build-essential
sudo apt-get install manpages-dev autoconf automake libtool
sudo apt-get install flex bison gcc-doc g++
'Hope that helps .. PSM
 
Old 09-06-2009, 08:23 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by supravat View Post
$ man malloc

but it shows no manual entry.
Hopefully you knew that should be in section (3) of man pages.

So if someone hadn't told you the right answer:

Quote:
Originally Posted by paulsm4 View Post
"apt-get install manpages-dev"
you could have found it yourself. You should know at least that the file you want has malloc.3 in its name, so you would want to know which Ubuntu package includes that file. A great place to answer such questions is:

http://packages.ubuntu.com/

Scroll down to "Search the contents of packages" then enter the partial name malloc.3 in the box, then click the button that says "packages that contain files whose names contain the keyword". Then press search. Then look down the long list of such files that it provides for the one that looks most plausible for your purposes, which is pretty obviously /usr/share/man/man3/malloc.3.gz and look beside it for the package name, which PSM already told you this time. But sometimes you'll want to find such things faster yourself.

For other C/C++ functions, I often find the man pages don't give the information I need. One of the several resources better than the man pages that I use is

http://www.cplusplus.com/reference/

Notice the Search box at the type. Type in the name of a C or C++ function and press search and it will take you to documentation on that function.

Last edited by johnsfine; 09-06-2009 at 08:29 AM.
 
Old 09-06-2009, 09:43 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
man malloc

certainly should have brought up your local equiv of this http://linux.die.net/man/3/malloc unless you haven't got man installed properly. Until you do set it up, you might want to bookmark that site.
I suspect you haven't installed the dev tools pkg(s), so you wouldn't have the man pages either, it's all part of the same pkg.
 
  


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




All times are GMT -5. The time now is 10:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration