desktop wrote:
> Each time I compile my program I get something like this:
>
> g++ trigraphs o draw main.cpp lGL lGLU lglut lX11 lm I../src
> In file included from solution/print.h:6,
> from solution/rasterizer.h:10,
> from main.cpp:26:
> solution/rasterizer.h:328:7: warning: no newline at end of file
> In file included from main.cpp:26:
> solution/rasterizer.h:328:7: warning: no newline at end of file
> In file included from main.cpp:30:
> solution/fragment_program.h:38:7: warning: no newline at end of file
> solution/rasterizer.h: In member function ‘void
> graphics::MyRasterizer<math_types>::init(const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&)’:
> solution/rasterizer.h:145: error: expected `)' before ‘{’ token
> solution/rasterizer.h: In member function ‘void
> graphics::MyRasterizer<math_types>::init(const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&) [with math_types =
> graphics::MyMathTypes]’:
> main.cpp:200: instantiated from here
> solution/rasterizer.h:136: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h:137: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h:138: warning: converting to ‘int’ from ‘float’
> main.cpp:200: instantiated from here
> solution/rasterizer.h:140: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h: In member function ‘Line
> graphics::MyRasterizer<math_types>::createLine(typ ename
> math_types::vector3_type, typename math_types::vector3_type,
> std::string) [with math_types = graphics::MyMathTypes]’:
> solution/rasterizer.h:115: instantiated from ‘void
> graphics::MyRasterizer<math_types>::init(const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&, const typename
> math_types::vector3_type&, const typename math_types::vector3_type&,
> const typename math_types::vector3_type&) [with math_types =
> graphics::MyMathTypes]’
> main.cpp:200: instantiated from here
> solution/rasterizer.h:171: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h:172: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h:173: warning: converting to ‘int’ from ‘float’
> solution/rasterizer.h:174: warning: converting to ‘int’ from ‘float’
> make: *** [main] Error 1
>
> In this case I got an error because of a missing matching parenthesis.
> But each time I use a rather large amount of time finding the above
> errormessage.
>
> Is there someway to compile with the option that only errormessages will
> be shown?
uncomment the lines that likely to produce compile time error,
then you can locate the exact place where you write the code wrong.
so don't wait to compile until you write a lot of new complicated code.
