J
Jason Heyes
There are 3 files in the project. I compiled it with VC++ 6.0 and got an
unresolved external symbol error. What am I doing wrong?
// Foo.cpp
#include "Foo.h"
using namespace foo;
void f() { }
// Foo.h
namespace foo { void f(); }
// Main.cpp
#include "Foo.h"
int main()
{
foo::f();
return 0;
}
--------------------Configuration: Examples - Win32
Debug--------------------
Compiling...
****** {BD Software Proxy CL v2.44a} STL Message Decryption is ON! ******
Main.cpp
Foo.cpp
Linking...
Main.obj : error LNK2001: unresolved external symbol "void __cdecl
foo::f(void)" (?f@foo@@YAXXZ)
Examples.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Examples.exe - 2 error(s), 0 warning(s)
Thanks guys.
unresolved external symbol error. What am I doing wrong?
// Foo.cpp
#include "Foo.h"
using namespace foo;
void f() { }
// Foo.h
namespace foo { void f(); }
// Main.cpp
#include "Foo.h"
int main()
{
foo::f();
return 0;
}
--------------------Configuration: Examples - Win32
Debug--------------------
Compiling...
****** {BD Software Proxy CL v2.44a} STL Message Decryption is ON! ******
Main.cpp
Foo.cpp
Linking...
Main.obj : error LNK2001: unresolved external symbol "void __cdecl
foo::f(void)" (?f@foo@@YAXXZ)
Examples.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Examples.exe - 2 error(s), 0 warning(s)
Thanks guys.