-1
가능한 중복 : 템플릿 정의?
Why should the implementation and the declaration of a template class be in the same header file?
Why can templates only be implemented in the header file?
내가 C에서 함수 템플릿에 대한 두 가지 기본적인 질문이 ++.
- .h 파일에 템플릿을 정의해야합니까?
- 나는 dll을 생성하고 해당 dll에서 전체 C++ 클래스를 내 보냈다. 그리고이 클래스는 함수 템플릿을 포함합니다. 이 템플릿을이 DLL을 호출하는 다른 모듈 내부에서 호출하고 있습니다. 이 템플릿 관련 오브젝트 파일이 생성 될 때.