-2
私はC++で ヘッダーが.hの中で定義されていますが、プログラムをコンパイルしようとしていますがリンクすることはできませんし、定義がCPPファイルであるC++リンクエラー:問題は、私はリンクエラーをgottingだということです オブジェクト
layer.obj : error LNK2005: "public: __thiscall input_layer::input_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall input_layer::~input_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: virtual void __thiscall input_layer::calc_out(void)" ([email protected][email protected]@UAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall output_layer::output_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall output_layer::~output_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: virtual void __thiscall output_layer::calc_out(void)" ([email protected][email protected]@UAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::calc_error(float &)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::randomize_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::update_weights(float)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::list_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::list_errors(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::write_weights(int,struct _iobuf *)" ([email protected][email protected]@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::read_weights(int,struct _iobuf *)" ([email protected][email protected]@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall output_layer::list_outputs(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall middle_layer::middle_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall middle_layer::~middle_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall middle_layer::calc_error(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall network::network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: __thiscall network::~network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::set_training(unsigned int const &)" ([email protected]@@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: unsigned int __thiscall network::get_training_value(void)" ([email protected]@@QAEIXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::get_layer_info(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::set_up_network(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::randomize_weights(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::update_weights(float)" ([email protected]@@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::write_weights(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::read_weights(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::list_weights(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::list_outputs(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::write_outputs(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::list_errors(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: int __thiscall network::fill_IObuffer(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::set_up_pattern(int)" ([email protected]@@[email protected]) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::forward_prop(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layer.obj : error LNK2005: "public: void __thiscall network::backward_prop(float &)" ([email protected]@@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall Kohonen_layer::Kohonen_layer(int,int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall Kohonen_layer::~Kohonen_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: virtual void __thiscall Kohonen_layer::calc_out(void)" ([email protected][email protected]@UAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_layer::randomize_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_layer::update_neigh_size(int)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_layer::update_weights(float)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_layer::list_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_layer::list_outputs(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: float __thiscall Kohonen_layer::get_win_dist(void)" ([email protected][email protected]@QAEMXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall Kohonen_network::Kohonen_network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall Kohonen_network::~Kohonen_network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::get_layer_info(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::set_up_network(int)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::randomize_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::update_neigh_size(int)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::update_weights(float)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::list_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::list_outputs(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::get_next_vector(struct _iobuf *)" ([email protected][email protected]@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall Kohonen_network::process_next_pattern(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: float __thiscall Kohonen_network::get_win_dist(void)" ([email protected][email protected]@QAEMXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: int __thiscall Kohonen_network::get_win_index(void)" ([email protected][email protected]@QAEHXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall input_layer::input_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall input_layer::~input_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: virtual void __thiscall input_layer::calc_out(void)" ([email protected][email protected]@UAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall output_layer::output_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall output_layer::~output_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: virtual void __thiscall output_layer::calc_out(void)" ([email protected][email protected]@UAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::calc_error(float &)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::randomize_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::update_weights(float)" ([email protected][email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::list_weights(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::list_errors(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::write_weights(int,struct _iobuf *)" ([email protected][email protected]@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::read_weights(int,struct _iobuf *)" ([email protected][email protected]@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall output_layer::list_outputs(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall middle_layer::middle_layer(int,int)" ([email protected]@[email protected]@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall middle_layer::~middle_layer(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall middle_layer::calc_error(void)" ([email protected][email protected]@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall network::network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: __thiscall network::~network(void)" ([email protected]@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::set_training(unsigned int const &)" ([email protected]@@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: unsigned int __thiscall network::get_training_value(void)" ([email protected]@@QAEIXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::get_layer_info(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::set_up_network(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::randomize_weights(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::update_weights(float)" ([email protected]@@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::write_weights(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::read_weights(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::list_weights(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::list_outputs(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::write_outputs(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::list_errors(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: int __thiscall network::fill_IObuffer(struct _iobuf *)" ([email protected]@@[email protected]@@Z) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::set_up_pattern(int)" ([email protected]@@[email protected]) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::forward_prop(void)" ([email protected]@@QAEXXZ) already defined in kohonen.obj
layerk.obj : error LNK2005: "public: void __thiscall network::backward_prop(float &)" ([email protected]@@[email protected]) already defined in kohonen.obj
Debug/Test4.exe : fatal error LNK1169: one or more multiply defined symbols found
プログラムのコードソースがエラーだけで、あなたのコードを見ていなければ、ここで http://blog.drsofts.com/konohen.zip
質問を再定式化する必要があります。この形式では、おそらく閉鎖されます。誰もあなたのプログラムをダウンロードして検査するつもりはない。いくつかの協力**が必要です**。 – kkm
同じオブジェクトファイルを2回リンクするか、#includesなどを混乱させて同じ関数を2回定義するかのように見えます。冗長な出力にリンクして、より多くの情報を取得してみてください。プロジェクトからkohonen.cppを取り出してみてください。次に、試したこととその結果を説明します。 – kkm