ホーム » 2019 » 8月 » 07

日別アーカイブ: 2019/08/07

2019年8月
 123
45678910
11121314151617
18192021222324
25262728293031

カテゴリー

アーカイブ

ブログ統計情報

  • 99,465 アクセス


NAS でのコンパイルエラー

Iwao@DS116:~/gcc_test/Test/gons_to$ g++ gons_to.cpp
In file included from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/gonsa_to.hxx:24:0,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/Test/gons_to.hpp:11,
                 from gons_to.cpp:13:
/volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/ga_dae.hxx: In function 'Xml_E GonsA_ToDAE(const GonsA&, c_v_tstring&)':
/volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/ga_dae.hxx:180:95: error: invalid initialization of non-const reference of type 'Vd3& {aka Vector3<double>&}' from an rvalue of type 'Vd3 {aka Vector3<double>}'
      Xml_E nodeR = dae_out::node_lookat(ID_visual_scene_n_c_R,ID_camera_R_STD,stdR.GetEyePoint(),target) ;
                                                                               ~~~~~~~~~~~~~~~~^~
In file included from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/ga_dae.hxx:12:0,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/gonsa_to.hxx:24,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/Test/gons_to.hpp:11,
                 from gons_to.cpp:13:
/volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/fe_dae.hxx:596:15: note:   initializing argument 3 of 'static Xml_E dae_out::node_lookat(LPCTSTR, LPCTSTR, Vd3&, Vd3&)'
  static Xml_E node_lookat (
               ^~~~~~~~~~~
In file included from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/gonsa_to.hxx:24:0,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/Test/gons_to.hpp:11,
                 from gons_to.cpp:13:
/volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/ga_dae.hxx:181:95: error: invalid initialization of non-const reference of type 'Vd3& {aka Vector3<double>&}' from an rvalue of type 'Vd3 {aka Vector3<double>}'
      Xml_E nodeL = dae_out::node_lookat(ID_visual_scene_n_c_L,ID_camera_L_STD,stdL.GetEyePoint(),target) ;
                                                                               ~~~~~~~~~~~~~~~~^~
In file included from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/ga_dae.hxx:12:0,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/gonsa_to.hxx:24,
                 from /volume1/public/C_Sync/GoogleD/Develop/_.SRC/Test/gons_to.hpp:11,
                 from gons_to.cpp:13:
/volume1/public/C_Sync/GoogleD/Develop/_.SRC/__Iwao/fe_dae.hxx:596:15: note:   initializing argument 3 of 'static Xml_E dae_out::node_lookat(LPCTSTR, LPCTSTR, Vd3&, Vd3&)'
  static Xml_E node_lookat (
               ^~~~~~~~~~~
Iwao@DS116:~/gcc_test/Test/gons_to$ g++ gons_to.cpp
Iwao@DS116:~/gcc_test/Test/gons_to$ ./a.out

invalid initialization of non-const reference of type
node_lookat の 3 つ目の Vd3& を const とすることで対応.
invalid initialization of non-const reference of type” で検索するとわかりやすく書いてあった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.