Код: Выделить всё
Unresolved external symbol \__declspec(dllimport) public: \__cdecl Foo\::Foo\(void) ...
Код: Выделить всё
///Foo.h
#pragma once
template
class Foo {
public:
__declspec(dllexport) Foo();
}
///Foo.cpp
template Foo::Foo() {
// ...
}
///main.cpp
#include "Foo.h"
int main(void) {
Foo longfoo;
}
Код: Выделить всё
Foo::Foo() {}
Foo::Foo() {}
Foo::Foo() {}
Подробнее здесь: https://stackoverflow.com/questions/781 ... l-with-cpp