:

compile with dev c++

Added by: ~newbie, 2011 III 29

Added by: ~newbie, 2011 III 29

can some one tell me how to compile it with dev c++?
I #include <ttmath/ttmath.h>
and in my main function have something like this :
ttmath::UInt<100> s;

but when i compile it give me error message:
21 C:\Users\ss\Desktop\cs 340\p1\a.cpp `UInt' undeclared (first use this function)
21 C:\Users\ss\Desktop\cs 340\p1\a.cpp `ttmath' has not been declared
C:\Users\ss\Desktop\cs 340\p1\a.cpp In function `int main()':
\Users\ss\Desktop\cs 340\p1\a.cpp
C:\Users\ss\Desktop\cs 340\p1\C ttmath/ttmath.h: No such file or directory.

Added by: tomek, 2011 IV 04

In such a case means that your compiler doesn't see the ttmath header files. Put all files (ttmath.h and the rest) into your project directory and use #include "ttmath.h".

Added by: ~Mario, 2011 XI 26

I use DEV-Cpp and I have this error when compile:
-------
Kompilator: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Wykonywanie make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include/ttmath"

In file included from ttmathint.h:48,
from ttmathbig.h:46,
from ttmath.h:58,
from main.cpp:1:
ttmathuint.h:3912: error: ISO C++ forbids declaration of `wostream' with no type
ttmathuint.h:3912: error: `wostream' is neither function nor member function; cannot be declared friend

ttmathuint.h:3912: error: expected `;' before '&' token
ttmathuint.h:3921: error: expected `;' before "private"
ttmathuint.h:3970: error: ISO C++ forbids declaration of `wistream' with no type
ttmathuint.h:3970: error: `wistream' is neither function nor member function; cannot be declared friend
ttmathuint.h:3970: error: expected `;' before '&' token
ttmathuint.h:4013: error: expected `;' before "private"

In file included from ttmathbig.h:46,
from ttmath.h:58,
from main.cpp:1:
ttmathint.h:1849: error: ISO C++ forbids declaration of `wostream' with no type
ttmathint.h:1849: error: `wostream' is neither function nor member function; cannot be declared friend
ttmathint.h:1849: error: expected `;' before '&' token
ttmathint.h:1858: error: expected `;' before "private"

ttmathint.h:1913: error: ISO C++ forbids declaration of `wistream' with no type
ttmathint.h:1913: error: `wistream' is neither function nor member function; cannot be declared friend
ttmathint.h:1913: error: expected `;' before '&' token
ttmathint.h:1920: error: expected `;' before '}' token

In file included from ttmath.h:58,
from main.cpp:1:
ttmathbig.h:5950: error: ISO C++ forbids declaration of `wostream' with no type
ttmathbig.h:5950: error: `wostream' is neither function nor member function; cannot be declared friend

ttmathbig.h:5950: error: expected `;' before '&' token
ttmathbig.h:5959: error: expected `;' before "private"

ttmathbig.h:6049: error: ISO C++ forbids declaration of `wistream' with no type
ttmathbig.h:6049: error: `wistream' is neither function nor member function; cannot be declared friend
ttmathbig.h:6049: error: expected `;' before '&' token
ttmathbig.h:6056: error: expected `;' before '}' token

make.exe: *** [main.o] Error 1
--------------------------------

what can I do wrong?
ttmath headers is in project folder.

Added by: ~WielkiSlimak, 2011 XI 27

> ttmathuint.h:3912: error: ISO C++ forbids declaration of `wostream' with no type

mingw has a problem with wide characters, use
#define TTMATH_DONT_USE_WCHAR 1
before including ttmath.h header