Linux-Development-Apps Digest #469, Volume #6    Tue, 28 Mar 00 18:13:19 EST

Contents:
  Re: Any good _free_ class libraries out there? (Andreas Rottmann)
  Re: Any good _free_ class libraries out there? (Kaz Kylheku)
  Retrieving the title of an (n)xterm window? ("Norm Dresner")
  Re: Mapfile support with gcc/g++ on Linux?? ("Arthur H. Gold")
  Re: Allocating Memory (LiNuX_MaN)
  Re: Allocating Memory (Andre Kostur)
  Re: Allocating Memory (Kaz Kylheku)
  Re: Allocating Memory ("Peter T. Breuer")
  Re: Text segment and virtual memory (Nate Eldredge)
  Re: database programming html (Chris)
  Shared memory allocator for Linux... (Paul Douglas)
  Re: Shared memory allocator for Linux... (TJ Walls)
  Re: Allocating Memory (Daniel Graf)
  Re: C++ in Linux (Jaap)

----------------------------------------------------------------------------

From: Andreas Rottmann <[EMAIL PROTECTED]>
Subject: Re: Any good _free_ class libraries out there?
Date: 28 Mar 2000 19:05:19 +0200

David Steuber <[EMAIL PROTECTED]> writes:

> In the windows world, it is almost standard practice to use MFC for
> application development.  I was wondering what C++ class libraries
> were available in Linux land.
> 

You'll use MFC for GUI stuff only right? In Linux you have to choose
between different GUI Kits: GTK+/Gnome, Qt/KDE, wxWindows
(cross-Platform) or even plain Xt (X Toolkit) or X.

BTW: visiting http://www.freshmeat.net is always a good idea to find
free software.

Andy
-- 
Andreas Rottmann (Dru@ICQ, 54523380@ICQ)
Pfeilgasse 4-6/725, A-1080 Wien, Austria, Europe
http://www.altern.org/arot/
mailto:[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Any good _free_ class libraries out there?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 28 Mar 2000 19:38:41 GMT

On 28 Mar 2000 19:05:19 +0200, Andreas Rottmann <[EMAIL PROTECTED]> wrote:
>David Steuber <[EMAIL PROTECTED]> writes:
>
>> In the windows world, it is almost standard practice to use MFC for
>> application development.  I was wondering what C++ class libraries
>> were available in Linux land.
>> 
>
>You'll use MFC for GUI stuff only right? In Linux you have to choose

MFC has non-GUI things in it as well, but you would be crazy to use it.

MFC is only a good choice if you don't ever expect to port the code to any
non-Windows platform. It's also not well supported on Windows CE.

>between different GUI Kits: GTK+/Gnome, Qt/KDE, wxWindows
>(cross-Platform) or even plain Xt (X Toolkit) or X.

For other services such as threading and networking, there is something
called ACE, a project headed by Doug Schmidt. It's a C++ framework for
distributed computing which provides abstractions for various system
interfaces.

-- 
#exclude <windows.h>

------------------------------

Reply-To: "Norm Dresner" <[EMAIL PROTECTED]>
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Retrieving the title of an (n)xterm window?
Date: Tue, 28 Mar 2000 20:14:32 GMT

It's easy using the escape sequences "\033]1;%s\007" and "\033]2;%s\007" to
change the title (and iconic name) for an (n)xterm window.

Does anyone know how to retrieve the title?  (For example,  I might want
change the title when my program starts and to restore it when it's done)

Thanks
    Norm



------------------------------

Date: Tue, 28 Mar 2000 14:26:14 +0000
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Crossposted-To: gnu.g++.help,gnu.gcc.help
Subject: Re: Mapfile support with gcc/g++ on Linux??

Duncan Foster wrote:
> 
> I guess this related more to the linker than the Gnu compilers but
> maybe someone here can help. When building shared object libaries on
> Solaris I can define a mapfile during link-edit which specifies the
> scope of each symbol within that shared object library. This can give
> a dramatic improvement to the time taken to initialise and perform the
> necessary relocations within the library at runtime (since relocations
> against symbols with local scope are reduced to relative relocations).
> My question is, is there something similar for gcc/g++ on Linux??
> 
> Thanks,
> Duncan
> 
> Duncan Foster - Sun Microsystems, Ireland - Desktop Applications &
> Middleware
> Extension: 19282     Phone: +353-1-819-9282    Fax: +353-1-819-9200
Look at the information on version scripts in the info pages for ld.

HTH,
--ag

-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Look for a lawyer who speaks Aramaic...about trademark infringement.

------------------------------

Subject: Re: Allocating Memory
From: LiNuX_MaN <[EMAIL PROTECTED]>
Date: Tue, 28 Mar 2000 12:41:04 -0800

Good, good, good. It is true. I am from Brazil and that I don't
have fluency in English. But my problem...
It is so difficult that I am not getting to build the question.
I will make it again.

I created a variable of the type string, I allocated it and I
gave (I related) to it as value a string ( strcat
(Var1, "Blue"); ). But before of creating it I was already
working with other variables of this type (char *). Then later
when I printed the first variable in the screen (Var1) it
contained the value related to itself and still a part of the
value of another variable string (that I was working). Note that
I allocated space (in memory) for all of these variables.
In article <38e0faf1.69042507@server>, [EMAIL PROTECTED] (Daniel
Graf) wrote:
>On Tue, 28 Mar 2000 18:24:01 GMT, [EMAIL PROTECTED] (Kaz
>Kylheku) wrote:
>
>>On Tue, 28 Mar 2000 17:55:03 GMT, Daniel Graf <[EMAIL PROTECTED]>
wrote:
>>>On Tue, 28 Mar 2000 09:00:17 -0800, LiNuX_MaN
>>><[EMAIL PROTECTED]> wrote:
>>>
>>>>Hi, Linux programmers!
>>>>
>>>>In this time I am with allocate (memory) problems.
>>>
>>>Your message is difficult to read.
>>>
>>>I read this as: This time, I am having memory allocation
problems.
>>>
>>>>I want to attribute for a var a string.
>>>
>>>Hmm, "attribute" is a noun (a thing).  I think you wanted a
verb (an
>>>action) here.
>>
>>Attribute is also a verb, albeit a transitive one that
requires some kind of
>>object, with the preposition ``to'': as in, ``the invention of
quicksort is
>>attributed to C. A. R. Hoare''.
>>
>>Thus LinuxMan, who is apparently not a native speaker/writer
of English, has
>>merely used the wrong preposition ``for'' instead of ``to''.
So change that to
>>``I want to attribute to a variable, a string.'' and you have
something that is
>>halfway there; though ``associate with'' or ``bind to'' or
some such phrase
>>would work better, since to attribute means simply to
recognize some existing
>>association or origin, not to forge a new association.
>
>I see.  If I thought english was his native language, I
wouldn't have
>been as patient.  He appears to be in Brazil and probably speaks
>Portuguese.
>
>>
>>The real problem with the posting is that it doesn't
adequately describe any
>>concrete problem in terms of what is actually going in on the
software. A code
>>snippet would help.
>>>>Then when I use this var it
>>>>retrieve the value of the last var created in the code plus
the
>>>>value that I have attributed for it.
>>>
>>>Still don't know what you mean by "attributed".
>>
>>Seems like some kind of reference mixup; an incorrectly or
indeterminately
>>valued pointer variable unexpectedly retrieves the value of
the wrong object.
>>
>>Without seeing the code, or at least a detailed, specific
description of the
>>problem, one would have to have psychic powers in order to
provide meaningful
>>advice to this fellow.
>
>
>


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!


------------------------------

Subject: Re: Allocating Memory
From: [EMAIL PROTECTED] (Andre Kostur)
Date: Tue, 28 Mar 2000 20:47:20 GMT

[EMAIL PROTECTED] (LiNuX_MaN) wrote in
<[EMAIL PROTECTED]>: 

>Good, good, good. It is true. I am from Brazil and that I don't
>have fluency in English. But my problem...
>It is so difficult that I am not getting to build the question.
>I will make it again.

LiNuX_MaN:

Show us some code.  That would be a language that both you and the readers 
of this newsgroup are fluent in.  But I'll try to interpret your 
statements:

>I created a variable of the type string, I allocated it and I

Did you do:

  string Var1s;

or:

  char * Var1c = new char[12];

>gave (I related) to it as value a string ( strcat
>(Var1, "Blue"); ). But before of creating it I was already

  strcat(Var1s, "Blue");

will not work.  Var1s is a string, strcat wants a char *.  You can say:

  Var1s = "Blue";

If you were using Var1c, did you make sure that the amount of memory that 
you allocated was big enough?  For example, to hold the the value "Blue", 
you need 5 bytes of memory, not 4 (you need an extra byte for the '\0' 
character at the end of the string).

>working with other variables of this type (char *). Then later

Show us how you were working with the other variables.

>when I printed the first variable in the screen (Var1) it
>contained the value related to itself and still a part of the
>value of another variable string (that I was working). Note that
>I allocated space (in memory) for all of these variables.

Show us how you allocated the memory for the variables.

------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Allocating Memory
Reply-To: [EMAIL PROTECTED]
Date: Tue, 28 Mar 2000 20:47:25 GMT

On Tue, 28 Mar 2000 12:41:04 -0800, LiNuX_MaN
<[EMAIL PROTECTED]> wrote:
>Good, good, good. It is true. I am from Brazil and that I don't
>have fluency in English. But my problem...
>It is so difficult that I am not getting to build the question.
>I will make it again.
>
>I created a variable of the type string, I allocated it and I
>gave (I related) to it as value a string ( strcat

The strcat function appends to an existing null terminated string; it cannot be
used to give a value to a string. If you apply strcat() to uninitialized
storage, the behavior is undefined.  You want to use strcpy() or strncpy().

------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Allocating Memory
Date: 28 Mar 2000 20:49:19 GMT

LiNuX_MaN <[EMAIL PROTECTED]> wrote:
: It is so difficult that I am not getting to build the question.
: I will make it again.

Don't describe! That's useless. If you were capable of describing
the problem even to yourself correctly, you wouldn't have the problem.
Just show the code. Your problem is you. Get yourself out of the way.

: I created a variable of the type string, I allocated it and I
: gave (I related) to it as value a string ( strcat
: (Var1, "Blue"); ). But before of creating it I was already

Do you mean that your code is:

    char * y =  strcat(x, "Blue");

?? Then you are already in trouble. This is wrong. It should be:

    char y[128];
    strcpy(y,x);
    strcat(y,"Blue");

: working with other variables of this type (char *). Then later
: when I printed the first variable in the screen (Var1) it
: contained the value related to itself and still a part of the
: value of another variable string (that I was working). Note that

This is incomprehensible rubbish. Use code, not your description of
code.

: I allocated space (in memory) for all of these variables.

That's what you think you did. Now show us what you did.

Peter

------------------------------

From: Nate Eldredge <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: Re: Text segment and virtual memory
Date: 28 Mar 2000 13:14:12 -0800

TJ Walls <[EMAIL PROTECTED]> writes:

> Hello,
> 
>    How does the the linux program loader allocate virtual memory for the text
> and data segments, and is there any user-land way to free them? I having tried
> unmapping the VM pages allocated for both regions from a shared library with
> the following results (reproduced on a Solaris 7 box)...
> 
>    I can unmap the page with the text segment (from a shared library routine),
> cannot mmap another page into the same VM region. The mmap call does not
> return an error, but core dumps. I _can_ however mmap a different physical
> page overtop of the already mapped VM page for the text segment!
> 
>   I cannot unmap the page containing the data segment or map other memory
> overtop of it. Again, the munmap calls core dumps.
> 
>   I've tried playing with various permission and locking settings to no
> avail... the only conclusion I can come up with is the kernel is not mmapping
> these pages into memory, but if it is not then how is it doing it?

You're sure this isn't a page that somehow needs to be used later?
Because if anything tries to access it again, you will core dump.  But
AFAIK, munmap should work on arbitrary pages.

-- 

Nate Eldredge
[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Chris)
Crossposted-To: comp.programming
Subject: Re: database programming html
Date: Tue, 28 Mar 2000 21:44:15 GMT

On Sun, 26 Mar 2000 10:41:03 +0200, p <[EMAIL PROTECTED]> wrote in
comp.os.linux.development.apps:

>I would like to write an invoice programm running through my browser (so
>that it can be used in a windows environment as well as in a linux
>environment). What programming language would i need, cgi, javascript,
>vbscript or ... ?

Compiled Java would offer both data security and program portability.  Any
script-based solution creates a potential for someone to write a spoof
page that can access the data in an inappropriate way.


------------------------------

From: Paul Douglas <[EMAIL PROTECTED]>
Subject: Shared memory allocator for Linux...
Date: Tue, 28 Mar 2000 22:21:40 GMT

Hi Everyone,

  I'm looking for routines that will allow me to allocate/de-allocate
  memory shared between Linux processes.  I would like to be able to
exchange
  messages between unrelated process that contain pointers to data
structures
  "malloced" from the shared memory.  This will allow large structures
to be
  shared between processes with a minimum of copies.

  Do such routines (versions of malloc??) exist?
  Thanks much,
  -P>


------------------------------

From: TJ Walls <[EMAIL PROTECTED]>
Subject: Re: Shared memory allocator for Linux...
Date: 28 Mar 2000 17:32:17 EST


==============B3252FDD44E853A9297C8D9F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Paul Douglas wrote:

> Hi Everyone,
>
>   I'm looking for routines that will allow me to allocate/de-allocate
>   memory shared between Linux processes.  I would like to be able to
> exchange
>   messages between unrelated process that contain pointers to data
> structures
>   "malloced" from the shared memory.  This will allow large structures
> to be
>   shared between processes with a minimum of copies.
>
>   Do such routines (versions of malloc??) exist?
>   Thanks much,
>   -P>

  Check the man page on "shmget()"

-TJ

--
========================================================================
      "Curiosity was framed; ignorance killed the cat."     -Unknown
========================================================================
TJ Walls
Research Associate
Reliable Software Technologies Inc.



==============B3252FDD44E853A9297C8D9F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Paul Douglas wrote:
<blockquote TYPE=CITE>Hi Everyone,
<p>&nbsp; I'm looking for routines that will allow me to allocate/de-allocate
<br>&nbsp; memory shared between Linux processes.&nbsp; I would like to
be able to
<br>exchange
<br>&nbsp; messages between unrelated process that contain pointers to
data
<br>structures
<br>&nbsp; "malloced" from the shared memory.&nbsp; This will allow large
structures
<br>to be
<br>&nbsp; shared between processes with a minimum of copies.
<p>&nbsp; Do such routines (versions of malloc??) exist?
<br>&nbsp; Thanks much,
<br>&nbsp; -P></blockquote>
&nbsp; Check the man page on "shmget()"
<p>-TJ
<pre>--&nbsp;
========================================================================
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Curiosity was framed; ignorance killed the 
cat."&nbsp;&nbsp;&nbsp;&nbsp; -Unknown
========================================================================
TJ Walls&nbsp;<[EMAIL PROTECTED]>
Research Associate
Reliable Software Technologies Inc.</pre>
&nbsp;</html>

==============B3252FDD44E853A9297C8D9F==


------------------------------

From: [EMAIL PROTECTED] (Daniel Graf)
Subject: Re: Allocating Memory
Date: Tue, 28 Mar 2000 22:47:18 GMT

This is much more readable ;)

If you can give us a small but complete example in code, we can should
be able to help.  


On Tue, 28 Mar 2000 12:41:04 -0800, LiNuX_MaN
<[EMAIL PROTECTED]> wrote:

>Good, good, good. It is true. I am from Brazil and that I don't
>have fluency in English. But my problem...
>It is so difficult that I am not getting to build the question.
>I will make it again.
>
>I created a variable of the type string, I allocated it and I
>gave (I related) to it as value a string ( strcat
>(Var1, "Blue"); ). But before of creating it I was already
>working with other variables of this type (char *). Then later
>when I printed the first variable in the screen (Var1) it
>contained the value related to itself and still a part of the
>value of another variable string (that I was working). Note that
>I allocated space (in memory) for all of these variables.
>In article <38e0faf1.69042507@server>, [EMAIL PROTECTED] (Daniel
>Graf) wrote:
>>On Tue, 28 Mar 2000 18:24:01 GMT, [EMAIL PROTECTED] (Kaz
>>Kylheku) wrote:
>>
>>>On Tue, 28 Mar 2000 17:55:03 GMT, Daniel Graf <[EMAIL PROTECTED]>
>wrote:
>>>>On Tue, 28 Mar 2000 09:00:17 -0800, LiNuX_MaN
>>>><[EMAIL PROTECTED]> wrote:
>>>>
>>>>>Hi, Linux programmers!
>>>>>
>>>>>In this time I am with allocate (memory) problems.
>>>>
>>>>Your message is difficult to read.
>>>>
>>>>I read this as: This time, I am having memory allocation
>problems.
>>>>
>>>>>I want to attribute for a var a string.
>>>>
>>>>Hmm, "attribute" is a noun (a thing).  I think you wanted a
>verb (an
>>>>action) here.
>>>
>>>Attribute is also a verb, albeit a transitive one that
>requires some kind of
>>>object, with the preposition ``to'': as in, ``the invention of
>quicksort is
>>>attributed to C. A. R. Hoare''.
>>>
>>>Thus LinuxMan, who is apparently not a native speaker/writer
>of English, has
>>>merely used the wrong preposition ``for'' instead of ``to''.
>So change that to
>>>``I want to attribute to a variable, a string.'' and you have
>something that is
>>>halfway there; though ``associate with'' or ``bind to'' or
>some such phrase
>>>would work better, since to attribute means simply to
>recognize some existing
>>>association or origin, not to forge a new association.
>>
>>I see.  If I thought english was his native language, I
>wouldn't have
>>been as patient.  He appears to be in Brazil and probably speaks
>>Portuguese.
>>
>>>
>>>The real problem with the posting is that it doesn't
>adequately describe any
>>>concrete problem in terms of what is actually going in on the
>software. A code
>>>snippet would help.
>>>>>Then when I use this var it
>>>>>retrieve the value of the last var created in the code plus
>the
>>>>>value that I have attributed for it.
>>>>
>>>>Still don't know what you mean by "attributed".
>>>
>>>Seems like some kind of reference mixup; an incorrectly or
>indeterminately
>>>valued pointer variable unexpectedly retrieves the value of
>the wrong object.
>>>
>>>Without seeing the code, or at least a detailed, specific
>description of the
>>>problem, one would have to have psychic powers in order to
>provide meaningful
>>>advice to this fellow.
>>
>>
>>
>
>
>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
>The fastest and easiest way to search and participate in Usenet - Free!
>


------------------------------

Date: Wed, 29 Mar 2000 00:51:51 +0000
From: Jaap <[EMAIL PROTECTED]>
Subject: Re: C++ in Linux

On 27/03/00,22:44 Pavel Litvinenko wrote:

:
:
:Klaus-Georg Adams wrote:
:> 
:> "A S" <[EMAIL PROTECTED]> writes:
:> 
:> > Hi !
:> >     I'm just shifting over to Linux for C++ programming (from Win/Dos). My
:> > Problem is I can't find a nice IDE. I've been able to use g++ but isn't

:> >
:> Hi,
:> there's a free (as in free beer, not free speech :-) version of Sniff+
:> for Linux (snoop around on www.takefive.com).
:
:C-Forge is not bad too, http://www.codeforge.com
:> --
:> MfG, Klaus-Georg Adams
:---------
:      E-mail: [EMAIL PROTECTED]

I use emacs as IDE.

Grt,  Jakob
+------------------------------------------------------------------+
|     email: [EMAIL PROTECTED] (don't use my 'From' address)        |
+------------------------------------------------------------------+


------------------------------


** 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
******************************

Reply via email to