Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Napoleon on May 04, 2014, 07:43:07 pm

Title: Where can I get/find the source files for the various C libraries?
Post by: Napoleon on May 04, 2014, 07:43:07 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
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: stahta01 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 (http://forums.codeblocks.org/index.php/topic,9996.0.html)

Tim S
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: Napoleon on May 05, 2014, 05:37:00 am
Obviously it's not a setting in C:B.
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: digifuzzy 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.
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: Napoleon 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.
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: oBFusCATed 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.
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: stahta01 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.
 
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: Napoleon on May 06, 2014, 11:37:08 pm
thanks oBFusCATed, at least I have an idea what to search for.
Title: Re: Where can I get/find the source files for the various C libraries?
Post by: Jenna 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.