Digestifier
Fri, 15 Sep 2000 02:06:49 -0700
Linux-Development-Apps Digest #892, Volume #6 Fri, 15 Sep 00 05:13:09 EDT
Contents:
Elementary dynamic library question... ("Johan Jönemo")
Re: What is the best(easiest) GUI developing tool for a newbie? (John Culleton)
Web Cam drivers ("Brett L. Moore")
Re: What is the best(easiest) GUI developing tool for a newbie? (Donovan Rebbechi)
Re: Shared libs, _init, runtime library calls ("Nikita V. Youshchenko")
Re: prblem with gdb and threads (Andrzej Popowski)
Opening a network device ("jscunnin")
Message distribution manager / server ("Dave Vance")
Best Way to Start Programming GUI Apps in Linux. . . ("wisaac")
Re: Best Way to Start Programming GUI Apps in Linux. . . ("wisaac")
Re: What is the best(easiest) GUI developing tool for a newbie? ("wisaac")
Re: Best Way to Start Programming GUI Apps in Linux. . . ([EMAIL PROTECTED])
Re: Message distribution manager / server (Erik Max Francis)
Hex Editors? ("Art Decco")
gcc and function templates (Ross Vandegrift)
Sound programming guide ("Johan Jönemo")
Where can I find lint for Linux (Carfield Yim)
Re: gcc and function templates (Erik Max Francis)
lcrypt (B.Lim)
Re: What is the best(easiest) GUI developing tool for a newbie? (Anton Mans)
Problems with g77 optimisations (Erwan Adam)
----------------------------------------------------------------------------
From: "Johan Jönemo" <[EMAIL PROTECTED]>
Subject: Elementary dynamic library question...
Date: Thu, 14 Sep 2000 19:16:51 +0200
I want to write a program that uses plugins. I am aware of the posix
functions dlopen, dlsym and so on. My concern is, however, wether these are
fully C++ compatible...
What I want to do is to write in the file that is compiled as a shared
object file the following:
class GrisaKnoen : public FetaSuggan {
...
};
FetaSuggan* grisaFabriken() {
return new GrisaKnoen;
}
I then want to get a function pointer to grisaFabriken() and use GrisaKnoen
objects in the main program where FetaSuggan's interface is known. Does this
work? Any special considerations?
Also, can one name ones shared objectfiles anything (say, skip the so
suffix) if one just want to load them actively with dlopen, considering that
the name is passed as an argument? What compiler flags should I use for
compiling the shared object files and the executable?
I would be grateful for all tips, but if you feel that you "shouldn't have
to explain these things" - don't!
Johan Jönemo
------------------------------
From: John Culleton <[EMAIL PROTECTED]>
Subject: Re: What is the best(easiest) GUI developing tool for a newbie?
Date: Thu, 14 Sep 2000 17:19:23 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Donovan Rebbechi) wrote:
> On Thu, 14 Sep 2000 10:11:45 GMT, [EMAIL PROTECTED] wrote:
>
>
> Cheers,
> --
> Donovan
>
I have qt installed. I went to look at the documentation and it is some
strange variant of html (xml??). The suffix is .doc which implies MSWord
:-( My netscape sort of butchers it.
Can you point me to a Qt homepage where documentation is available in
some regular format, such as html, pdf, ps, tex etc. ? Or tell me how to
read the stuff theat is in the .doc format? Also can you evaluate Qt as
compared to Xforms?
John Culleton
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Brett L. Moore" <[EMAIL PROTECTED]>
Subject: Web Cam drivers
Date: Thu, 14 Sep 2000 18:32:49 GMT
Does anyone have source code for an interface to the Logitech Quickcam or
other web cams?
Thanks,
brett
------------------------------
From: [EMAIL PROTECTED] (Donovan Rebbechi)
Subject: Re: What is the best(easiest) GUI developing tool for a newbie?
Date: 14 Sep 2000 18:44:54 GMT
On Thu, 14 Sep 2000 17:19:23 GMT, John Culleton wrote:
>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Donovan Rebbechi) wrote:
>> On Thu, 14 Sep 2000 10:11:45 GMT, [EMAIL PROTECTED] wrote:
>>
>>
>> Cheers,
>> --
>> Donovan
>>
>
>I have qt installed. I went to look at the documentation and it is some
>strange variant of html (xml??). The suffix is .doc which implies MSWord
>:-( My netscape sort of butchers it.
>
>Can you point me to a Qt homepage where documentation is available in
>some regular format, such as html, pdf, ps, tex etc. ? Or tell me how to
>read the stuff theat is in the .doc format? Also can you evaluate Qt as
>compared to Xforms?
The homepage is www.troll.no IIRC.
Why not just download Qt and compile it ? The default install creates
html documentation.
--
Donovan
------------------------------
From: "Nikita V. Youshchenko" <[EMAIL PROTECTED]>
Subject: Re: Shared libs, _init, runtime library calls
Date: Thu, 14 Sep 2000 21:16:11 +0400
John Theisen wrote:
>
> I am also trying to get _init() and _fini() to work. In my case, the
> -nostdlib (or -nostartfiles) options solves the name clash. However I
> have another strange issue...
>
> In my shared library, I declare a global object; but when I use the
> -nostdlib (or -nostartfiles) options, the default
> constructor/destructor for my global object never gets called!
>
> Calls to the member functions of the global object succeed, however
> the constructor never gets called to initialize my member variables.
> If I DON'T use the -nostdlib option, the contructor gets called as
> expected, (but I have to remove the _init()/_fini() to avoid the name
> clash during link.) Any ideas?
This is because the code that calles global constructors is located in
the default _init(). So, when you start a C++ program normally linked,
first code from _init() calls all global constructors, and then main()
is called, so in main() you have all global objects already constructed
properly.
If you don't execute the default _init(), global constructors are not
called.
Nikita
------------------------------
From: [EMAIL PROTECTED] (Andrzej Popowski)
Subject: Re: prblem with gdb and threads
Date: Thu, 14 Sep 2000 19:58:28 GMT
Reply-To: [EMAIL PROTECTED]
14 Sep 2000 09:06:21 GMT, [EMAIL PROTECTED] (c) wrote:
>greetings Andrzej,
>alas gdb currently (anyone know if its being worked on?)
>isnt a lot of help with threads here :\ and just for kicks,
>if one of those threads cores you're not guaranteed (indeed
>it appears to be extremely unlikely) to get the stack dump from the thread
>that cored. there is however some help, first use the newsgroup
>comp.programming.threads, and read the associated FAQ pointer
>"Welcome to COMP.PROGRAMMING.THREADS" (it just got posted)
Thanks for your response. I will try with this group.
Andrzej Popowski
------------------------------
From: "jscunnin" <[EMAIL PROTECTED]>
Subject: Opening a network device
Date: Thu, 14 Sep 2000 14:47:11 -0600
I need to perform an IOTCL function on our network device driver but I have
been unsuccessful in opening the device. The device returned by "ifconfig"
for which I am trying to connect to is "eth0".
I attempted the following with no avail:
fd = open("eth0", ...)
if (fd == -1){...error...}
ioctl(fd, ....)
Does anyone know how to open the network device an perform an ioctl on it?
Thanks
John
------------------------------
From: "Dave Vance" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development.system,comp.os.linux.embedded,comp.os.linux.help,comp.os.linux.questions
Subject: Message distribution manager / server
Date: Thu, 14 Sep 2000 17:05:22 -0600
Can anybody tell me if there is such a thing as an Event Distribution
Manager / Event Notification Server / Message Queue Manager / Message
Distribution Manager / Message Notification Server.. for Linux?
Basically, an entity (application, driver, whatever) that accepts messages
from one set of applications and forwards those messages on to another set
of applications, which have "registered" with the distribution manager to
receive messages.
------------------------------
From: "wisaac" <[EMAIL PROTECTED]>
Subject: Best Way to Start Programming GUI Apps in Linux. . .
Date: Thu, 14 Sep 2000 23:46:26 GMT
I would like to start getting more involved with Linux programming. I've
used GNU g++, but I've never done any graphical user interfaces. I've done
some Windows programming, but never Linux.. Any suggestions on where to
begin? (I'm really hoping there are some good Linux programs that compare to
the VC++ IDE.)
------------------------------
From: "wisaac" <[EMAIL PROTECTED]>
Subject: Re: Best Way to Start Programming GUI Apps in Linux. . .
Date: Thu, 14 Sep 2000 23:50:38 GMT
I suppose I should be a little more specific.. What I want to start
learning how to do is make KDE or Gnome apps.
"wisaac" <[EMAIL PROTECTED]> wrote in message
news:mrdw5.24727$[EMAIL PROTECTED]...
> I would like to start getting more involved with Linux programming. I've
> used GNU g++, but I've never done any graphical user interfaces. I've
done
> some Windows programming, but never Linux.. Any suggestions on where to
> begin? (I'm really hoping there are some good Linux programs that compare
to
> the VC++ IDE.)
------------------------------
From: "wisaac" <[EMAIL PROTECTED]>
Subject: Re: What is the best(easiest) GUI developing tool for a newbie?
Date: Thu, 14 Sep 2000 23:56:56 GMT
Also, there is a Sams book on QT. Learn Qt in 24 Hours.. I haven't read it
yet, so I can't really recommend it. Just thought that you might like to
know that there are at least a few books on GUI programming in Linux.
"Donovan Rebbechi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Thu, 14 Sep 2000 17:19:23 GMT, John Culleton wrote:
> >In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] (Donovan Rebbechi) wrote:
> >> On Thu, 14 Sep 2000 10:11:45 GMT, [EMAIL PROTECTED] wrote:
> >>
> >>
> >> Cheers,
> >> --
> >> Donovan
> >>
> >
> >I have qt installed. I went to look at the documentation and it is some
> >strange variant of html (xml??). The suffix is .doc which implies MSWord
> >:-( My netscape sort of butchers it.
> >
> >Can you point me to a Qt homepage where documentation is available in
> >some regular format, such as html, pdf, ps, tex etc. ? Or tell me how to
> >read the stuff theat is in the .doc format? Also can you evaluate Qt as
> >compared to Xforms?
>
> The homepage is www.troll.no IIRC.
>
> Why not just download Qt and compile it ? The default install creates
> html documentation.
>
> --
> Donovan
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Best Way to Start Programming GUI Apps in Linux. . .
Date: Fri, 15 Sep 2000 03:15:13 +0200
[EMAIL PROTECTED],Newsgate schreibt:
>From: "wisaac" <[EMAIL PROTECTED]>
>Subject: Re: Best Way to Start Programming GUI Apps in Linux. . .
>Date: Thu, 14 Sep 2000 23:50:38 GMT
>I suppose I should be a little more specific.. What I want to start
>learning how to do is make KDE or Gnome apps.
>"wisaac" <[EMAIL PROTECTED]> wrote in message
>news:mrdw5.24727$[EMAIL PROTECTED]...
>> I would like to start getting more involved with Linux programming.
>I've
>> used GNU g++, but I've never done any graphical user interfaces. I've
>done
>> some Windows programming, but never Linux.. Any suggestions on where
>to
>> begin? (I'm really hoping there are some good Linux programs that
>compare
>to
>> the VC++ IDE.)
=============
Well, you have several options. For KDE, I recommend using kdevelop
(http://www.kdevelop.org) It comes with a (IMHO quite good) IDE and a
dialog designer.
If you want to program GNOME and you like Delphi, try VDKBuilder
(http://vdkbuilder.sourceforge.net -- warning: this does not use gtk
directly but wraps it in a C++ library called VDK.
If you are just looking for a comfortable program to edit your code and
to compile it, use EMACS, the coolest program ever written (That thing
is able to do just anything [if you know a little LISP, that is...])
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development.system,comp.os.linux.embedded,comp.os.linux.help,comp.os.linux.questions
Subject: Re: Message distribution manager / server
Date: Thu, 14 Sep 2000 16:18:16 -0700
Dave Vance wrote:
> Can anybody tell me if there is such a thing as an Event Distribution
> Manager / Event Notification Server / Message Queue Manager / Message
> Distribution Manager / Message Notification Server.. for Linux?
Yeah, it's called email.
--
Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ A physicist is an atom's way of knowing about atoms.
\__/ George Wald
Fat Boy and Little Man / http://www.fatboyandlittleman.com/
Watch Fat Boy and Little Man go about their antics.
------------------------------
From: "Art Decco" <[EMAIL PROTECTED]>
Subject: Hex Editors?
Date: Thu, 14 Sep 2000 20:31:21 -0700
Can anyone tell me a bit about hex viewers / editors for unix / linux?
I do lots of internationalization work. I frequently need to see exactly
what bits are in a file, and I can't rely on a text editor's (or a terminal
emulator's) interpretation of those bits. Octal won't do. Neither will that
charming unix convention of displaying bytes as control-left elbow-type
keystroke sequences.
So here are my questions:
Is there any standard unix command line tool that will display a hex view of
a file? I'm asking about standard in the sense of likely to be available on
most unix boxes I visit, so I can count on it (usually) being there, like vi
or cat. I could write one of my own in Perl, but it wouldn't be available
everywhere I needed tend to go.
Is there any standard, or perhaps relatively common, command line hex EDITOR
available on most unix boxes that would let me edit a file (change the bits)
directly in hex?
Finally, is there a really good GUI hex editor for Linux developers? This
one wouldn't be standard, I assume, just a good program that I could perhaps
download as an RPM, now that I'm beginning my exploration of the world of
Linux.
Thanks.
------------------------------
From: Ross Vandegrift <[EMAIL PROTECTED]>
Subject: gcc and function templates
Date: Fri, 15 Sep 2000 01:07:02 -0400
Reply-To: [EMAIL PROTECTED]
Hello all,
I'm sure this is a FAQ, and I'm somewhat embarassed that as a C
programmer of five years I can't solve it, but deja.com has shown me no
secrets so here goes...
I'm trying to build an object file that contains a few useful
function templates, so I stick something like this in a file:
template <class T>
int is_true (T &foo)
{
if (foo)
return 1;
else
return 0;
}
and make an associated header file. This file will compile fine into a
.o. However, when I go to link it into a program that does something like
int foo = 0;
int bar = is_true (foo);
g++ spits out the error:
/tmp/cc3VGJui.o(.text+0x7b): undefined reference to `int is_true<int>(int
&)'
What is preventing this simple (yes, I have even tried this exact
example...) test from succeeding? I have tested this behaviour on egcs
1.0.2 and 1.1.2 and read other posts on deja.com refering to gcc 2.8 as
well (but of course no solutions... gotta love deja).
Thanks in advance,
Ross Vandegrift
------------------------------
From: "Johan Jönemo" <[EMAIL PROTECTED]>
Subject: Sound programming guide
Date: Fri, 15 Sep 2000 07:11:15 +0200
I would like to learn a little about sound in Linux. I have tried writing to
/dev/audio and I suppose that works but I don't know (and can't change) the
sampling frequency and resolution. Any tips or a link to a guide programming
guide?
Johan Jönemo
------------------------------
From: Carfield Yim <[EMAIL PROTECTED]>
Subject: Where can I find lint for Linux
Date: Fri, 15 Sep 2000 12:28:28 +0800
Hi, I would like to try to use lint to check my C program that run in
Linux, but I find that my linux box don't come with lint, where can I
download lint for Linux?
Besides, I would like to ask do lint provide better code checking than
gcc's warning message?
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Subject: Re: gcc and function templates
Date: Thu, 14 Sep 2000 22:30:12 -0700
Ross Vandegrift wrote:
> g++ spits out the error:
>
> /tmp/cc3VGJui.o(.text+0x7b): undefined reference to `int
> is_true<int>(int &)'
>
> What is preventing this simple (yes, I have even tried this exact
> example...) test from succeeding?
The problem is one of instantiation. Check out the gcc info page; there
are a few ways to do it. The simplest (and most portable) way to handle
this situation is to have the template definitions (the _definitions_,
not just the declarations) in the header file (or at least in a file
ultimately included by the header file), not in a source file that you
compile and link in separately.
The reason is pretty simple, if you think about it: Templates behave
much like macros, in that they're defined and then instantiated when
needed. If the definition is in a separately-compiled source file, and
you use the template (i.e., need it instantiated) in another, then gcc
can't know what it needs to do because the relevant definitions aren't
handy when it's compiling the source. To let gcc do its thing without
getting into explicit (and non-Standard) instantiations, ensure the
definition of the template is handy when it needs it by simply making
sure it's included. The worst thing that can happen is that it results
in a little code bloat (but I think gcc is much better about stripping
out the duplicates now).
--
Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ All the people in my neighborhood turn around and get mad and sing
\__/ Public Enemy
Crank Dot Net / http://www.crank.net/
Cranks, crackpots, kooks, & loons on the Net.
------------------------------
From: [EMAIL PROTECTED] (B.Lim)
Subject: lcrypt
Date: 15 Sep 2000 06:11:03 GMT
Can anyone tell me where I can get 'lcrypt'? I'm trying to
compile util-linux to enable serpent encryption support in
losetup and mount so that I can use the loopback encrypted
file system. When doing a './configure' it states that I
need lcrypt. What library does lcrypt belong to? I'm running
Debian 2.2 and would like to know if there's a deb package of
that library that has 'lcrypt'.
Thanks.
Benjamin Lim.
------------------------------
From: Anton Mans <[EMAIL PROTECTED]>
Subject: Re: What is the best(easiest) GUI developing tool for a newbie?
Date: Fri, 15 Sep 2000 10:55:56 +0200
Donovan Rebbechi wrote:
>
> On Thu, 14 Sep 2000 17:19:23 GMT, John Culleton wrote:
> >In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] (Donovan Rebbechi) wrote:
> >> On Thu, 14 Sep 2000 10:11:45 GMT, [EMAIL PROTECTED] wrote:
> The homepage is www.troll.no IIRC.
It has been moved to http://www.trolltech.com
>
> Why not just download Qt and compile it ? The default install creates
> html documentation.
You don't even need to compile it, just unzip and untar
and you can read the docs in html.
--
groeten, Anton, en bedenk:
Microsoft Windows:
Niets werkt zo goed als een frisse reboot.
------------------------------
From: Erwan Adam <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.fortran
Subject: Problems with g77 optimisations
Date: Fri, 15 Sep 2000 08:54:36 +0000
Hi,
I've got a problem with the g77 of a linux mandrake 6.0 distribution.
Problem:
========
The code at the end of the message gives a wrong
result when compiled with the -O or the -O2 option:
> g77 prob_optim_g77.f
> ./a.out
XX, YY, ZZ : 150. 10. 10.
XX, YY, ZZ : 50. 10. 10.
> g77 -O prob_optim_g77.f
> ./a.out
XX, YY, ZZ : 150. 10. 10.
XX, YY, ZZ : 150. 10. 10.
and what is more curious is that if we "dis-comment" the line
C WRITE(*,*) 'A1, A2, A3 : ',A1,A2,A3
then the result is correct with -O but stays wrong with -O2 :
> g77 -O prob_optim_g77.f
> ./a.out
XX, YY, ZZ : 150. 10. 10.
A1, A2, A3 : -2500. -900. -900.
XX, YY, ZZ : 50. 10. 10.
> g77 -O2 prob_optim_g77.f
> ./a.out
XX, YY, ZZ : 150. 10. 10.
A1, A2, A3 : 7500. -900. -900.
XX, YY, ZZ : 150. 10.
10.
i.e the code passes the whole test (.AND.) when one
of the test is false !!
Questions:
==========
1. Does anyone ever met a similar problem ?
2. If it's a bug of g77 (?!), is it corrected in
more recent version ?
2bis. If not, who is the good person to be warn of this ?
Thanks for your help,
E.A.
Code source:
============
C ---------------------------------------------
PROGRAM TOTO
REAL MIN,MAX,XX,YY,ZZ,A1,A2,A3
C ---------
MIN = 0.
MAX = 100.
XX = 150.
YY = 10.
ZZ = 10.
WRITE(*,*) 'XX, YY, ZZ : ',XX,YY,ZZ
C ---------
307 CONTINUE
A1=(XX-MIN)*(XX-MAX)
A2=(YY-MIN)*(YY-MAX)
A3=(ZZ-MIN)*(ZZ-MAX)
IF((A1.LE.0.).AND.(A2.LE.0.).AND.(A3.LE.0.)) THEN
C WRITE(*,*) 'A1, A2, A3 : ',A1,A2,A3
WRITE(*,*) 'XX, YY, ZZ : ',XX,YY,ZZ
GO TO 308
END IF
IF(XX.LT.MIN) XX=2.*MIN-XX
IF(XX.GT.MAX) XX=2.*MAX-XX
GO TO 307
C ---------
308 CONTINUE
END
C ---------------------------------------------
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.apps) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-Apps Digest
******************************