Author Topic: Where can I get/find the source files for the various C libraries?  (Read 5494 times)

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
[Ubuntu 13.10]
When I'm debugging my C (and C++) programs, occasionally I would like to see the library source code, but C::B tells me it can't find the file.
Is this a setup thing?  Do I need to install a package or download them?  Or are they located somewhere on my system.  I have installed sudo apt-get install manpages-posix-dev.
I'm particularly interested in libpthread (eg pthread_cond_init.c).

Cheers,
Nap

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Where can I get/find the source files for the various C libraries?
« Reply #1 on: May 04, 2014, 08:01:00 pm »
[Ubuntu 13.10]
When I'm debugging my C (and C++) programs, occasionally I would like to see the library source code, but C::B tells me it can't find the file.
Is this a setup thing?  Do I need to install a package or download them?  Or are they located somewhere on my system.  I have installed sudo apt-get install manpages-posix-dev.
I'm particularly interested in libpthread (eg pthread_cond_init.c).

Cheers,
Nap

This is NOT a CB Question!

Likely OS, Compiler, or Library question none of which really are valid on this site.

Please re-read the rule! http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Where can I get/find the source files for the various C libraries?
« Reply #2 on: May 05, 2014, 05:37:00 am »
Obviously it's not a setting in C:B.

Offline digifuzzy

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Where can I get/find the source files for the various C libraries?
« Reply #3 on: May 05, 2014, 05:51:22 am »
Obviously it's not a setting in C:B.

Sorry, mate.
If I put the mouse over the file name in the include statement then right click, the first option in the context menu is "open #inlcude file: filename".
If that doesn't open the file...yup...you have a setup issue. ( Build-essentials, gtk...host of others...haven't used ubuntu in ages).

Ubuntu forums might help you with your setup.

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Where can I get/find the source files for the various C libraries?
« Reply #4 on: May 06, 2014, 08:22:04 pm »
To be honest, I'm not really impressed with stahta01's answer.
I might be off topic, but its still a value question.  I've searched elsewhere and haven't found my answer yet.  In fact, I think I might have installed an improper version, but as yet I'm not sure.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Where can I get/find the source files for the various C libraries?
« Reply #5 on: May 06, 2014, 08:35:47 pm »
You need to install the debuginfo packages, if these exists for RedHat there is a command line tool to do it, but I don't know if there is such thing for ubuntu.
We can't help you much here. It is definitely a setup issue, not related to C::B.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Where can I get/find the source files for the various C libraries?
« Reply #6 on: May 06, 2014, 08:40:59 pm »
To be honest, I'm not really impressed with stahta01's answer.
I might be off topic, but its still a value question.  I've searched elsewhere and haven't found my answer yet.  In fact, I think I might have installed an improper version, but as yet I'm not sure.

I am NOT really impressed with your inability to read and follow the rules.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Where can I get/find the source files for the various C libraries?
« Reply #7 on: May 06, 2014, 11:37:08 pm »
thanks oBFusCATed, at least I have an idea what to search for.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Where can I get/find the source files for the various C libraries?
« Reply #8 on: May 06, 2014, 11:59:47 pm »
On debian based distros the packages usually have a "-dbg" in the name and are in the same repo as the "normal" packages.