- 145 名前:デフォルトの名無しさん [2011/12/20(火) 18:20:08.40 ]
- VC10で以下のヘッダーファイルはコンパイルが通るのですが、プリコンパイル済みヘッダーにしようとすると二重定義だと怒られます
回避策はないでしょうか。あるいはどこが記述が間違っているのでしょうか error LNK2005: "public: static void __cdecl Hoge<int>::FuncA(void)" (?FuncA@?$Hoge@H@@SAXXZ) は既に stdafx.obj で定義されています。 error LNK2005: "public: void __thiscall Hoge<int>::FuncB(void)" (?FuncB@?$Hoge@H@@QAEXXZ) は既に stdafx.obj で定義されています。 // Hoge.h #pragma once template<typename T> struct Hoge { static void FuncA(); void FuncB(); }; template<> void Hoge<int>::FuncA(){} template<> void Hoge<int>::FuncB(){}
|

|