ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am a newbie and I am trying to learn from sourcecodes. Now I have problem understanding (for learn!) autotools: here I have some variables. In this following variable declaration-assignment
Many of those, especially the CFLAGS variants are passed in from the build environment. Others may be generated by pkg-config or other autotools macros.
The last one, @GSETTINGS_RULES@, appears to be derived from the GSettings API, part of glib build environment.
Don't seem that autoconfig set something to solve the symbol mousepad_window_get_type in the mousepad C source file mousepad-window.h row 46. Can you see the source so to help me?
How the symbol si referenced?
Function were not declared!
You will need to provide more information before anyone can help you.
What are you trying to do?
What commands are you using which produce an error?
What is the exact error message?
Have you tried to search for that error message?
What file are you talking about, and how is it related to the problem you are having? Etc...
I am trying lo learn programming reading sources. And I have a lot of problem, I am solving most of them; but here I have a broken symbol that I can't understand. I want understand all about programming, I will become a professional worker! I begin reading sources of xfce text editor: mousepad!
But there is that broken symbol never declared in files of mousepad sources!
See row 46 of file mousepad/mousepad-window-h :
GType mousepad_window_get_type (void) G_GNUC_CONST;
it is impossible to do a prototype of an inexistent function! And it is called by program
It has neither 'configure' nor 'INSTALL' file; though it does have an 'autgen.sh'
It turns out, this program has numerous dependencies; once you fix them all, you get a compilation error:
Code:
mousepad-window.c:1055:58: error: 'mousepad_window_ui' undeclared (first use in this function)
gtk_ui_manager_add_ui_from_string (window->ui_manager, mousepad_window_ui, mousepad_window_ui_length, NULL);
Though there is a mousepad-0.4 there, which does compile. For the first glance, it is much nicer than gedit.
I am trying lo learn programming reading sources. And I have a lot of problem, I am solving most of them; but here I have a broken symbol that I can't understand. I want understand all about programming, I will become a professional worker! I begin reading sources of xfce text editor: mousepad!
It is good that you are learning to program, but if learning only from reading other people's source code then you are on a very difficult path!
I would strongly suggest that you take a more organized and methodical approach to learning and begin by solidly learning the basic concepts and methods of a single language and some of the common tools such as GNU autotools first. There are many links at the top of the Programming forum and others here can recommend online sources if you have a specific interest.
Quote:
Originally Posted by Unaaaaab
But there is that broken symbol never declared in files of mousepad sources!
See row 46 of file mousepad/mousepad-window-h :
GType mousepad_window_get_type (void) G_GNUC_CONST;
it is impossible to do a prototype of an inexistent function! And it is called by program
I direct you again to the links I provided in my first post. It is important that you learn how to form and ask questions in any forum setting. You need to provide the information necessary for others to fully understand your problem, and you need to respond directly when others ask for additional information, such as the questions I asked above which you have not yet answered.
Quote:
Originally Posted by Unaaaaab
Please, can you download the sources of mousepad and help me?
It is not reasonable nor very polite to expect others to download and read through a complete source file, and more so when you do not even provide a link! NevemTeve has been nice enough to find a file which may be the same you are using, and provide a response, but that is far beyond what you should expect others to do!
In future, please put more effort into asking your questions, providing necessary details and responding to requests for additional information. Remember that everyone here volunteers their time, please respect that and help them make best use of that time.
It is good that you are learning to program, but if learning only from reading other people's source code then you are on a very difficult path!
I would strongly suggest that you take a more organized and methodical approach to learning and begin by solidly learning the basic concepts and methods of a single language and some of the common tools such as GNU autotools first. There are many links at the top of the Programming forum and others here can recommend online sources if you have a specific interest.
I direct you again to the links I provided in my first post. It is important that you learn how to form and ask questions in any forum setting. You need to provide the information necessary for others to fully understand your problem, and you need to respond directly when others ask for additional information, such as the questions I asked above which you have not yet answered.
It is not reasonable nor very polite to expect others to download and read through a complete source file, and more so when you do not even provide a link! NevemTeve has been nice enough to find a file which may be the same you are using, and provide a response, but that is far beyond what you should expect others to do!
In future, please put more effort into asking your questions, providing necessary details and responding to requests for additional information. Remember that everyone here volunteers their time, please respect that and help them make best use of that time.
My question is yet smart!
I ask how is possible to do prototype of a a UNdeclared function and call it. Use IDE features to find that function is called in the source file at a GObject creation code row
My question is yet smart!
I ask how is possible to do prototype of a a UNdeclared function and call it. Use IDE features to find that function is called in the source file at a GObject creation code row
If you continue to ignore direct requests for information, and will not read the links you have been asked to review, you could lose the ability to post to these forums.
From the previously linked Site FAQ:
Quote:
If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere.
Please help us help you, and respect those volunteering assistance by responding to their requests for necessary information, and by showing some effort to understand and troubleshoot your problem yourself.
utente@JJjjo:~/Desktop/mousepad-master$ ls
AUTHORS COPYING mousepad po TODO
autogen.sh m4 mousepad.desktop.in.in README
configure.ac.in Makefile.am NEWS THANKS
utente@JJjjo:~/Desktop/mousepad-master$ ./autogen.sh
autogen.sh: You don't seem to have the Xfce development tools installed on
your system, which are required to build this software.
Please install the xfce4-dev-tools package first, it is available
from http://www.xfce.org/.
utente@JJjjo:~/Desktop/mousepad-master$ autoreconf
autoreconf: 'configure.ac' or 'configure.in' is required
utente@JJjjo:~/Desktop/mousepad-master$ mv configure.ac.in configure.ac
utente@JJjjo:~/Desktop/mousepad-master$ autoreconf
configure.ac:39: error: required file './compile' not found
configure.ac:39: 'automake --add-missing' can install 'compile'
configure.ac:25: error: required file './config.guess' not found
configure.ac:25: 'automake --add-missing' can install 'config.guess'
configure.ac:25: error: required file './config.sub' not found
configure.ac:25: 'automake --add-missing' can install 'config.sub'
configure.ac:31: error: required file './install-sh' not found
configure.ac:31: 'automake --add-missing' can install 'install-sh'
configure.ac:57: error: required file './ltmain.sh' not found
configure.ac:31: error: required file './missing' not found
configure.ac:31: 'automake --add-missing' can install 'missing'
Makefile.am:14: warning: '%'-style pattern rules are a GNU make extension
Makefile.am: error: required file './INSTALL' not found
Makefile.am: 'automake --add-missing' can install 'INSTALL'
mousepad/Makefile.am:87: error: HAVE_DBUS does not appear in AM_CONDITIONAL
mousepad/Makefile.am:119: error: HAVE_DBUS does not appear in AM_CONDITIONAL
mousepad/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
mousepad/Makefile.am: error: required file './depcomp' not found
mousepad/Makefile.am: 'automake --add-missing' can install 'depcomp'
autoreconf: automake failed with exit status: 1
utente@JJjjo:~/Desktop/mousepad-master$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.