Operating System - Linux
1748265 Members
3936 Online
108760 Solutions
New Discussion юеВ

Problems with aCC compiler

 
ramirobmar
New Member

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
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

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
ramirobmar
New Member

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




Dennis Handly
Acclaimed Contributor

Re: Problems with aCC compiler

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