I have an app of my own making that I haven't done any work on in two years that I want to pick up again. It's standard C and GTK-2.0 The last time it was worked on was on a Ubuntu system. I installed the Puppy devx package, recreated the app's directory structure, and ran the makefile to see what would happen. The result was better than I expected. But it can't find the include files for gtk, gdk, etc.

My question has to do with the path to include files. On the Ubuntu system the following invocations worked:

do you actually use libgnome? Puppy doesn't have it and that is breaking your pkg-config line

run that line in a terminal to check the output - its great that its in the makefile but that doesn't tell you that it actually works

then try removing libgnome and see if it will build, for puppy it would be better to avoid the mostly superfluos gnome bits ... and looking at the names of the object files, gmodule is probably unnecessary too.

Unless you have over 100 or so files to compile, there is no need for a makefile. A basic gtk app that isn't a buggy p.o.s. should compile with:

Code:

gcc `pkg-config --cflags gtk+-2.0` *.c -o myapp -lgtk-x11-2.0

if that works you can add optimization flags like -pipe -combine -Os (optimise and minimize size)

p.s. next time you get an error message it would be helpful to report it - does this ring a bell?

Quote:

Package libgnome-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnome-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnome-2.0' found

I've been using makefiles for 30 years so it's an old habit. I always use make, even for a single source file.

And yes, I did see the lib error message, but I figured first things first. Not finding the gtk includes prevents compilation. Sort that out first and get it to compile, then worry about linking and libraries. But your point is well taken. I can't remember off-hand why I added libgnome but I'll find out.

Not finding the gtk includes prevents compilation. Sort that out first and get it to compile, then worry about linking and libraries.

when you call pkg-config with multiple entries (gtk and gnome) if any one of them is unavailable, none of the include are output because pkg-config just outputs the error (and nothing else) and it will keep doing so until every .pc file is found (see /usr/lib/pkg-config), basically its about as crappy as the rest of the autotools garbage.

rather than an whole separate ridiculous system, packages could just have a file that could be sourced directly the same way shells include files for extra variables and functions

for example:

. $FLAGCONFIGPATH/gtk+-2.0.flags || echo warning can't find gtk2

similarly the same could be done by system libraries that provide any of the 5million things that configure checks in triplicate

. $FLAGCONFIGPATH/snprintf.flags || MISSING_SNPRINTF=1

(you don't want to see how it actually happens)_________________Check out my github repositories. I may eventually get around to updating my blogspot.

technosaurus: Thank you very much for the tips. And I apologize because part of my question was "dumb". After being away from programming for a bit, I had become rusty on how makefiles worked. Duh.

All is straightened out now, including the libao stuff which works perfectly. The reason libgnome was in there was because this application makes extensive use of configuration files in INI format and I was using the functions for that in libgnome. That's now deprecated so I wrote my own suite of functions to manipulate INI files and eliminated libgnome.

Next, I have to track down an interesting problem that's been there since day one but never manifested before. This app is multithreaded and somewhere I'm doing something that's not thread-safe. It never crashed on other platforms but on Puppy it crashes with a seg fault after about 10 seconds of operation, so I'm glad to have discovered the problem. The threads communicate with each other via FIFOs, which I assumed would avoid most problems but I'm doing something dumb somewhere. Should be fun to track down.

Puppy doesn't come with strace, but you can get it here:
http://landley.net/aboriginal/bin/
It's useful for rudimentary debugging, or you could post the code.
BTW if one of the pipes is stdin, gtk is likely the problem, however Gio has a file monitor that can watch a file for changes (on linux it uses inotify as a backend) My simple icon tray uses it to watch image files that get changed by shell scripts, but works for other situations._________________Check out my github repositories. I may eventually get around to updating my blogspot.

Technosaurus: I wanted to thank you again for the info. All is working great. I knocked together an application I've been threatening to write for about 15 years. haha.

Back around 1990 there was a DOS program called InfoSelect that was close to ideal for organizing bits of information and quickly accessing it. It was a DOS TSR program that became obsolete when DOS went away. The company that made InfoSelect developed the program into a clumsy Windows app that was no longer useful to me and I've missed the old InfoSelect ever since.

So now I have it back again. Simple, fast, does what I need and nothing more.

Is it something that could replace puppy's Notecase (which is no longer supported upstream)?

I sent a couple of PMs with the code attached (it's all in one file) and some comments on how it's supposed to work. I figure it's easier to show than tell.

The app is unpolished but I'm using it for my work already. It's a completely different paradigm from Notecase so I don't know whether it would be appropriate for replacing it. On the other hand, it does quite a lot for a tiny program.

Each day I'm making little fixes and improvements. For example, I just fixed an oversight (that's less than a bug, haha) where it was possible to open more than one search dialog at once.

If you're being generous and you like using SCM (version control), you can get a free account at github.com (if you use git SCM) or chiselapp.com (if you use fossil SCM) or bitbucket.org (if you use mercurial SCM) and upload your repository / code there. As a benefit, people can contribute to that code too and make it better.

Googling for "DOS InfoSelect" gives a few result but having no experience with it, I have no idea how it works.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum