|
From: Fibre O. <fib...@go...> - 2005-07-17 18:36:48
|
Vale Group wrote:
>When compiling MSS, be sure to add
>
>-DMSS
>
>to the project C++ compiler command line.
>
>
>When using MSS in your own programs, add
>
>#include "c:\mss121\mss.h"
>
>to each source code .c or .cpp file.
>
>
>Chuck
>
>
>
fixed, i think ... One thing is wird for me :-( When I have commented
out '#include <mss.h>' all is OK. - mss log file is on place, looks good
- but if not I have such message from sompiler:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\test\Makefile.win"
Executing make clean
rm -f main.o test.exe
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/Projects/mss121" -DMSS
main.cpp: In function `int main(int, char**)':
main.cpp:42: error: invalid conversion from `const char*' to `char*'
main.cpp:43: error: invalid conversion from `const char*' to `char*'
make.exe: *** [main.o] Error 1
Execution terminated
My simple, test code ise below::
//START
#include <iostream>
//#include <mss.h>
using namespace std;
int swap ( int inX, int inY )
{
int tmp;
tmp = inX;
inX = inY;
inY = tmp;
return 0;
}
int main(int argc, char *argv[])
{
int* x;
x = new int;
*x = 10;
int* y;
y = new int;
*y = 20;
for( int i = 0; i <= 100; i ++ ) {
cout << "Variable X: " << *x << endl;
cout << "Variable Y: " << *y << endl;
cout << "Swap variables ..." << endl;
swap( x, y );
cout << "Variable X: " << *x << endl;
cout << "Variable Y: " << *y << endl;
cout << endl;
}
delete x;
delete y;
system("PAUSE");
return EXIT_SUCCESS;
}
// STOP
Compilation log from Dev-cpp:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\test\Makefile.win"
Executing make clean
rm -f main.o test.exe
g++.exe -D__DEBUG__ -c main.cpp -o main.o
-I"C:/Dev-Cpp/Projects/mss121" -DMSS
g++.exe -D__DEBUG__ main.o -o "test.exe" ../mss121/libmss.a
Execution terminated
Compilation successful
Regards,
Fibre Optic
|