Re: Problems with aCC compiler (89 Views)
Reply
Occasional Visitor
ramirobmar
Posts: 2
Registered: ‎06-06-2007
Message 1 of 4 (89 Views)

Problems with aCC compiler

Hi, all

I have a problem when i use the compiler options -AA with the compiler aCC. I don't know if i need other options, this is a copy of the makefile that i use.

CXX= /opt/aCC/bin/aCC
CXXFLAGS= -g -v -AA -Wf,-o \
-I/opt/aCC/include \
-I/opt/aCC/include/iostream
.C.o:

$(CXX) -c $(CXXFLAGS) $*.cc

SOURCES= testing.cc
OBJECTS= ${SOURCES:.cc=.o}

all: $(OBJECTS)
$(CXX) -o $@ $(CXXFLAGS) ${OBJECTS}

clean clobber: tidy
rm -f *.I
tidy:
rm -f *.o core testing all
rm -f *.o core all
Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 2 of 4 (89 Views)

Re: Problems with aCC compiler

(I've asked this be moved to languages and scripting.)

It would have helped if you specified your problem with a little more detail.

You have illegally specified the default -I paths, remove them:
-I/opt/aCC/include
-I/opt/aCC/include/iostream
Occasional Visitor
ramirobmar
Posts: 2
Registered: ‎06-06-2007
Message 3 of 4 (89 Views)

Re: Problems with aCC compiler

My program is the next

#include
#include
#include
#include

using namespace std;

int main(int argc,char * argv[])
{

cout << "El numero de argumentos es: " << argc << endl;
return 1;
}

when i try to link my program i have the next links problems:



/opt/aCC/bin/aCC -g -AA -I/opt/aCC/include -I/opt/aCC/include/iostream -c testing.cc
Error 328: "/opt/aCC/include/memory", line 493 # Function 'bad_alloc' has not been defined yet; cannot call.
RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc);
^^^^^^^^^^^^^^^^^^
Error 419: "/opt/aCC/include/stdexcept", line 73 # 'exception' is used as a type, but has not been defined as a
type.
class RWSTDExport logic_error : public exception
^^^^^^^^^
Error 376: "/opt/aCC/include/stdexcept", line 73 # Class name expected.
class RWSTDExport logic_error : public exception


I use the next compilers options

CXX= /opt/aCC/bin/aCC
CXXFLAGS= -g -AA \
-I/opt/aCC/include \
-I/opt/aCC/include/iostream
LIBRARY= -L/usr/lib -llibCsup_v2 -llibstd_v2
.C.o:
@echo "Comienza a compilar ..."
$(CXX) -c $(CXXFLAGS) $*.cc
@echo "Fin de compilacià n ..."

SOURCES=testing.cc
OBJECTS=${SOURCES:.cc=.o}
PROGRAM=testing
all: $(OBJECTS)
@echo "comienza a linkar ..."
$(CXX) ${OBJECTS} ${LIBRARY} -o $(PROGRAM) $(CXXFLAGS)
@echo "fin del linkado ..."

clean clobber: tidy
rm -f *.I
tidy:
rm -f *.o core testing all




Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 4 of 4 (89 Views)

Re: Problems with aCC compiler

[ Edited ]

>#include <stream.h>

This header was obsolete even in cfront, remove it ASAP!

-I/opt/aCC/include \
-I/opt/aCC/include/iostream

You didn't do what I told you.

LIBRARY= -L/usr/lib -llibCsup_v2 -llibstd_v2

Again, you are illegally specifying the default runtime libs. Remove all of these. You are also specifying them in them wrong order.

You would only need these if you are creating plugins. See the following:
http://www.docs.hp.com/en/7762/5991-4874/distributing.htm#linking

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.