I've tried: "source files > add > existing item" and selected the .cpp/.h files but I get still a linker error (possibly because my .cpp files didn't get passed into compiler):
error LNK2001: unresolved external symbol "struct Mem mem" (?mem@@3UMem@@A)
How do I fix it?
I found the solution. I have extern struct Foo
in header file which I forget to give an actual definition in some .cpp file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.