HP aCC can't handle this simple program

HP aCC can't handle this simple program

Post by Kevin Hartma » Sun, 24 Feb 2002 00:43:48



Here is a program that when compiled/run on the HP, crashes.  It runs
fine on NT and Solaris.   Can anyone get this to run on their HP
machine?  If so, what's the trick?   I'm more interested in compiler
switches, patches, etc, but not changes to this code, unless someone
can tell me definitively that something in the code goes against the
C++ standard.

I compile it with "aCC -AA bug.cxx".  I've tried other compiler switch
combinations, but nothing works for me.

Thanks,
Kevin

------------------------- bug.cxx code Below ------------------

#include <vector>
#include <string>

class TableRow {
  public:
        TableRow(){};
        TableRow( long length ) { row.resize( length ); };
        virtual ~TableRow(){};
        std::vector<double> row;

Quote:};

class Table {
  public:
        Table(){};
        Table( long rowCount ) { rows.resize( rowCount ); };
        virtual ~Table(){};
        std::vector< TableRow > rows;

Quote:};

class TableList {
  public:
        TableList( long tableCount );
        virtual ~TableList(){};
        std::vector<Table> tableList;

Quote:};

TableList::TableList( long tableCount )
{
        tableList.resize(tableCount);

        tableList[ 0 ] = Table( 3 );
        tableList[ 1 ] = Table( 3 );
        tableList[ 2 ] = Table( 3 );

Quote:}

void testFunc()
{
        TableList a(3);

Quote:}

int main(int argc, char * argv[])
{
    testFunc();
    return 0;
Quote:}

 
 
 

HP aCC can't handle this simple program

Post by Dennis Hand » Wed, 27 Feb 2002 21:48:18


: Here is a program that when compiled/run on the HP, crashes.

It seems to work fine with A.03.33.  It was problem fixed with CR JAGad87227
Fix for allocation of uninitialized storage.

The change was for <vector.cc>.

 
 
 

1. aCC link error on dead simple program using OpenGL GLX

Hi,

I'm getting a link error with aCC I don't understand. I've looked
through all HP-UX dev-doc resources I could find online, aswell as
DejaNews and misc web search engines, but came up empty-handed.

So, I would be most grateful if somebody could explain why this
minimal example fails linking:

=== [snip] =========================================

#include <GL/glx.h>
int
main ()
{
  (void)glXChooseVisual(0L, 0, 0L);
  return 0;

=== [snip] =========================================

Compiling and linking with:

  $ aCC -g -I/opt/graphics/OpenGL/include -L/opt/graphics/OpenGL/lib test.cpp -lGL -lXext -lSM -lICE -lX11 -lm

I get this linker error:

  /usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (test.o) was detected. The linked output may not run on a PA 1.x system.
  /usr/ccs/bin/ld: Thread local storage symbol imported from shared library and space $THREAD_SPECIFIC$ is required but not found.

..and I don't quiet understand the linker error.  Using "pure" OpenGL
functions (ie not the X11-specific glX*() methods) works as
expected. Using functions from GLU (OpenGL utility library) fails in
the same manner as when using glX*() methods.

Regards,
Morten
--
Ees a sad an' beautiful world

2. Problem with macro generated table.

3. /usr/lib/aCC/dld.sl aka how can people run aCC built programs

4. When "encapsulation ppp" should be used for serial interface?

5. Problem of linking signal handling program with "-lpthread" option on HP-UX 11.0

6. Infinite Sums

7. Simple HP question ( can't find in FAQ )

8. What adapter for pure analog POTS phones?

9. Simple (?) X11/Motif/HPUX programming question

10. Simple X-Windows program Link problem.

11. X.25/ACC same as 'regular' X.25 devices?

12. simple c program

13. Problems with compiling simple C program