LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compiling from source (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-from-source-389576/)

manicman 12-05-2005 04:09 PM

compiling from source
 
right now at the moment im having problems geting things to compile it works fine if i configure it first by going
Code:

./configure
make
sudo make install

but when it comes with its own make file it never works hear is the error i get this is for a program called arasan a chess program
Code:

mkdir -p ../build
mkdir -p ../export
mkdir -p ../profile
mkdir -p ../prof_data
g++ -O2 -fforce-mem -fomit-frame-pointer -march=i686  -Wall  -c -o ../build/ar                                                                           
asanx.o arasanx.cpp
In file included from board.h:6,
                from arasanx.cpp:4:
types.h:53:25: error: strstream.h: No such file or directory
move.h:55: error: expected ‘,’ or ‘...’ before ‘&’ token
move.h:55: error: ISO C++ forbids declaration of ‘Board’ with no type
arasanx.cpp: In function ‘Move text_to_move(const Board&, const char*)’:
arasanx.cpp:135: error: no matching function for call to ‘CreateMove(const Boa                                                                           
rd&, Square&, Square&, PieceType&)’
move.h:55: note: candidates are: Move CreateMove(int)
move.h:58: note:                Move CreateMove(Square, Square, PieceType, Piec                                                                           
eType, PieceType, SpecialType)
move.h:71: note:                Move CreateMove(Square, Square)
move.h:81: note:                Move CreateMove(Square, Square, PieceType, Piec                                                                           
eType)
arasanx.cpp:138: error: no matching function for call to ‘CreateMove(const Boa                                                                           
rd&, Square&, Square&, int)’
move.h:55: note: candidates are: Move CreateMove(int)
move.h:58: note:                Move CreateMove(Square, Square, PieceType, Piec                                                                           
eType, PieceType, SpecialType)
move.h:71: note:                Move CreateMove(Square, Square)
move.h:81: note:                Move CreateMove(Square, Square, PieceType, Piec                                                                           
eType)
arasanx.cpp: In function ‘bool accept_draw(Board&)’:
arasanx.cpp:181: warning: comparison between signed and unsigned integer express                                                                           
ions
arasanx.cpp: In function ‘void doHint()’:
arasanx.cpp:879: warning: comparison between signed and unsigned integer express                                                                           
ions
arasanx.cpp:883: warning: comparison between signed and unsigned integer express                                                                           
ions
arasanx.cpp: In function ‘bool do_command(const char*, Board&)’:
arasanx.cpp:1533: error: ‘istrstream’ was not declared in this scope
arasanx.cpp:1533: error: expected `;' before ‘s’
arasanx.cpp:1535: error: ‘s’ was not declared in this scope
make: *** [../build/arasanx.o] Error 1

now i no this program works on my system beacuse it worked befor i recentley reformated and as far as i can tell nothing is differnt i get simalar errors when i do the same thing for other apps

sundialsvcs 12-05-2005 05:12 PM

When you get "missing file <strstream.h>", in my way of thinking ... that's the root problem and everything which follows is caused by it.

Find the file. Make sure that g++ can find the file.

manicman 12-06-2005 08:28 AM

ok ive found where the strstream.h is suposed to be and i dont have a strstream.h file but ive got one called strstream now ive found a strstream.h file on the internet but when i put this in the right direcotory i get this error
Code:

mkdir -p ../build
mkdir -p ../export
mkdir -p ../profile
mkdir -p ../prof_data
g++ -O2 -fforce-mem -fomit-frame-pointer -march=i686  -Wall  -c -o ../build/arasanx.o arasanx.cpp
move.h:55: error: expected ‘,’ or ‘...’ before ‘&’ token
move.h:55: error: ISO C++ forbids declaration of ‘Board’ with no type
arasanx.cpp: In function ‘Move text_to_move(const Board&, const char*)’:
arasanx.cpp:135: error: no matching function for call to ‘CreateMove(const Board&, Square&, Square&, PieceType&)’
move.h:55: note: candidates are: Move CreateMove(int)
move.h:58: note:                Move CreateMove(Square, Square, PieceType, PieceType, PieceType, SpecialType)
move.h:71: note:                Move CreateMove(Square, Square)
move.h:81: note:                Move CreateMove(Square, Square, PieceType, PieceType)
arasanx.cpp:138: error: no matching function for call to ‘CreateMove(const Board&, Square&, Square&, int)’
move.h:55: note: candidates are: Move CreateMove(int)
move.h:58: note:                Move CreateMove(Square, Square, PieceType, PieceType, PieceType, SpecialType)
move.h:71: note:                Move CreateMove(Square, Square)
move.h:81: note:                Move CreateMove(Square, Square, PieceType, PieceType)
arasanx.cpp: In function ‘bool accept_draw(Board&)’:
arasanx.cpp:181: warning: comparison between signed and unsigned integer expressions
arasanx.cpp: In function ‘void doHint()’:
arasanx.cpp:879: warning: comparison between signed and unsigned integer expressions
arasanx.cpp:883: warning: comparison between signed and unsigned integer expressions
arasanx.cpp: In function ‘bool do_command(const char*, Board&)’:
arasanx.cpp:1533: error: ‘istrstream’ was not declared in this scope
arasanx.cpp:1533: error: expected `;' before ‘s’
arasanx.cpp:1535: error: ‘s’ was not declared in this scope
make: *** [../build/arasanx.o] Error 1

now i do realease that useing any old strstream.h was probley a bad idea and i think the error is due to this so is there a way of configureing my own


All times are GMT -5. The time now is 10:47 PM.