help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

g++ HELP compiling a C++ program!!


From: derrick_chi
Subject: g++ HELP compiling a C++ program!!
Date: Thu, 30 Aug 2007 10:48:27 -0700
User-agent: G2/1.0

Hello All

I'm new to the forum, and I have a problem I hope you guys can help me
with. I have pasted some code below which I am trying to compile using
sde-lite on my linux box, and I am having one hell of a time trying to
do so. Can someone please take a look and the code and the compile
messages I get and tell me whats wrong, I've been at this for weeks
now, help me please!

Messages from the compile shown below. Its seems to be indicating that
there some incorrect paths to directories that I am missing.
The actual directories its mentions below are located in /sde-5.03/
sde6/include/c++/3.4.4. How can I correct this problem?



#include<ciso646>
#include<cmath>
#include<iomanip>
#include<iostream>


unsigned int GCD_FUNCT( unsigned int, unsigned int );

int main() {

unsigned int ARRAY[32], GCD[16];
unsigned int Loop_Control_V, Reg1, Reg2, new_value;


for ( unsigned int i = 0; i < 31; ++ i ) {


new_value = i + ( 3 * (4) );

if ( new_value % 2 != 0 ) {

new_value = new_value * 4;
}

else{
new_value = new_value * 10;
}

ARRAY[i] = new_value;
}

Loop_Control_V = 0;

while ( Loop_Control_V < 30 ) {

if ( ARRAY[Loop_Control_V] > ARRAY[Loop_Control_V + 1] ) {


Reg1 = ARRAY[Loop_Control_V];
Reg2 = ARRAY[Loop_Control_V + 1];
}

else {
Reg1 = ARRAY[Loop_Control_V + 1];
Reg2 = ARRAY[Loop_Control_V];
}

GCD[Loop_Control_V] = GCD_FUNCT(Reg1,Reg2);
Loop_Control_V = Loop_Control_V + 1;

}

return 0;

}

unsigned int GCD_FUNCT( unsigned int REGa, unsigned int REGb) {

unsigned int temp1, temp2, GCD;

temp1 = REGa;
temp2 = REGb;

while ( temp1 != temp2 ) {

if ( temp1 > temp2 ) {

temp1 = temp1 - temp2;
}
else {
temp2 = temp2 - temp1;
}
}
GCD = temp1;
return GCD;
}

sde-cpp -v -mtune=r2k -T ph.ld -O2 GCD.cpp -o GCD.bin

Messages from the compile shown below. Its seems to be indicating that
there some incorrect paths to directories that I am missing the
directories it mentions below are located in /sde-5.03/sde6/include/c+
+/3.4.4. How can I correct this problem?

Reading specs from /accts/ddwashin/Engineering_Projects/sde-5.03/
bin/../lib/gcc/sde/3.4.4/specs
Configured with: /var/tmp/releasetool.tmp/bank-20070420-1231/B-i386-
linux/toolchain/mipssde-6.06.01/configure --target=sde --prefix=/usr/
local/sde6 --enable-languages=c,c++ --without-newlib --disable-shared
--disable-nls --disable-tui --disable-multilib
Thread model: mipssde
gcc version 3.4.4 mipssde-6.06.01-20070420
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../libexec/gcc/sde/
3.4.4/cc1plus -E -quiet -v -iprefix /accts/ddwashin/
Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/3.4.4/ GCD.cpp -o
GCD.bin -mtune=r2k -O2
ignoring nonexistent directory "/usr/local/sde6/include/c++/3.4.4"
ignoring nonexistent directory "/usr/local/sde6/include/c++/3.4.4/sde"
ignoring nonexistent directory "/usr/local/sde6/include/c++/3.4.4/
backward"
ignoring nonexistent directory "/usr/local/sde6/lib/gcc/sde/3.4.4/
include"
ignoring nonexistent directory "/var/tmp/releasetool.tmp/
bank-20070420-1231/B-i386-linux/toolchain-build/sde/include"
ignoring nonexistent directory "/usr/local/sde6/sde/include"
#include "..." search starts here:
#include <...> search starts here:
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/
3.4.4/../../../../include/c++/3.4.4
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/
3.4.4/../../../../include/c++/3.4.4/sde
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/
3.4.4/../../../../include/c++/3.4.4/backward
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/
3.4.4/
include
/accts/ddwashin/Engineering_Projects/sde-5.03/bin/../lib/gcc/sde/
3.4.4/../../../../sde/include
End of search list.
GCD.cpp:76:3: warning: no newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]