LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-02-2017, 12:35 PM   #1
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Rep: Reputation: Disabled
CodeBlock functions reference?!


I am trying to learn programming, but i have problem.
with ide codeblock have information and autocompleation of function symbol works (and without full description of standard libraries!) only for in-same source definition; but not works with function obtaind trough linking post-compile
 
Old 07-03-2017, 05:02 AM   #2
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
I'm not exactly sure what you mean...

Are you talking about Apple code blocks for macOS and iOS?
 
Old 07-03-2017, 05:16 AM   #3
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
I am referring the IntegratedDevelopmentEnvironment Code::Blocks
 
Old 07-03-2017, 06:37 AM   #4
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513
Quote:
Originally Posted by Unaaaaab View Post
I am trying to learn programming, but i have problem.
with ide codeblock have information and autocompleation of function symbol works (and without full description of standard libraries!) only for in-same source definition; but not works with function obtaind trough linking post-compile
So how far are you in programming? And does the code compile and link? Code blocks will auto complete from any included file. What programming language are you using.
 
Old 07-03-2017, 12:53 PM   #5
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mill J View Post
So how far are you in programming? And does the code compile and link? Code blocks will auto complete from any included file. What programming language are you using.
Yes, CodeBlocks autocomplete from any include file. But a reference to a function is not only this, but also linking from other object (compiled) files. I want also this autocomplete; so as example:
some function from Glib or kernel call. Please reply to question.
 
Old 07-03-2017, 03:16 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
did you know code blocks got a forum to help others with there product?
http://forums.codeblocks.org/
 
Old 07-03-2017, 05:49 PM   #7
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
LinuxQuestion is also pertinent as general tech forum, and i prefer
 
Old 07-03-2017, 06:49 PM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,988

Rep: Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570
Quote:
Originally Posted by Unaaaaab View Post
Yes, CodeBlocks autocomplete from any include file. But a reference to a function is not only this, but also linking from other object (compiled) files. I want also this autocomplete; so as example:
some function from Glib or kernel call. Please reply to question.
Here's your reply.

You can't. Autocompletion is done from the headers ("include files"). That's how it works. If you don't have the headers, then you won't have autocompletion.

You need to install the headers and add them to Code::Blocks' "include path". On Debian-based (and AFAIK RPM-based) distros, the headers are in packages ending with "-dev". They need to be installed separately.

Last edited by dugan; 07-03-2017 at 06:57 PM.
 
Old 07-04-2017, 07:05 AM   #9
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
Here's your reply.

You can't. Autocompletion is done from the headers ("include files"). That's how it works. If you don't have the headers, then you won't have autocompletion.

You need to install the headers and add them to Code::Blocks' "include path". On Debian-based (and AFAIK RPM-based) distros, the headers are in packages ending with "-dev". They need to be installed separately.
Where are those of Glib and Gtk, and kernel calls? please
 
Old 07-04-2017, 11:26 AM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,988

Rep: Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570Reputation: 4570
You mean which packages do you need to install, or do you mean where would you find them on disk?

If you want to know the exact packages to install, then you need to tell us which distribution you're using.

Generally, the headers, once installed, would be in /usr/include.

In many cases, you can find which headers declare which functions ("calls") by entering "man 3" and the name of the function. For GTK and GLib, you'd check their API documentation.

EDITING TO ADD: The header files that declare the "kernel calls" are usually in a package named "kernel-headers".

Last edited by dugan; 07-04-2017 at 07:47 PM.
 
Old 07-05-2017, 06:10 AM   #11
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
I use linux Debian 9.
But how works a similar C header?
How can it declare a function outside the C programming language?
Or it uses merely prototipes, and the working call is made compiletime from linker or operating system?
Please explain me, and how see autocompletation in Code::Blocks!
 
Old 07-05-2017, 07:15 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,320
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
Hi Unaaaaab,

I like this advice:
Quote:
Originally Posted by Mill J View Post
So how far are you in programming? And does the code compile and link? Code blocks will auto complete from any included file. What programming language are you using.
Mainly because I do not feel that any IDE, auto-complete, or code blocks are worth anyone's time over "knowledge" of the language(s) you are programming within. For the most part, I compile with the command line as much as I can, and I use a rudimentary editor to view and edit my code, it does not have auto-complete.

Also I find that looking up the manual page for library calls is also very helpful. Having something auto-complete is "nice", but also having a full understanding of exactly what the function does seems to be more helpful for myself.
 
Old 07-05-2017, 06:19 PM   #13
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
There are no shortcuts to programming correctly. Of all the programmers I've known, all of them received some form of official instruction. It's like playing guitar or golfing. If you learn it on your own, you'll develop poor habits that you'll never get rid of.
 
Old 07-06-2017, 01:34 AM   #14
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
It's okay, this will not substitute reference.
But I did this exact question, on autocomplete
 
  


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
Undefined reference to Apache ARR functions grob115 Programming 4 01-27-2012 10:17 AM
[SOLVED] Python - Functions; pass by reference? YellowSnowIsBad Programming 2 12-30-2010 03:36 PM
OpenGL/Glut/Codeblock : compile error - - undefined reference to... stefanolima Programming 2 01-14-2010 08:53 AM
undefined reference to functions from pcap.h suchitra Programming 6 12-28-2007 12:53 AM
g++: inline functions can cause an undefined reference when linking? R00ts Programming 5 06-21-2005 03:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:56 PM.

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