Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkage problems with a dll in Visual Studio #152

Closed
GoogleCodeExporter opened this issue Mar 30, 2015 · 2 comments
Closed

Linkage problems with a dll in Visual Studio #152

GoogleCodeExporter opened this issue Mar 30, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

1. Create a dll with yaml-cpp 0.3.0 under Visual Studio 8 2005.

2. Try to link "run_tests"

This gives the linker errors

Error 1 error LNK2019: unresolved external symbol "void __cdecl 
YAML::operator>>(class YAML::Node const &,class YAML::Binary &)" 
(??5YAML@@YAXABVNode@0@AAVBinary@0@@Z) referenced in function "public: class 
YAML::Binary const __thiscall YAML::Node::to(void)const " 
(??$to@VBinary@YAML@@@Node@YAML@@QBE?BVBinary@1@XZ) parsertests.obj

Error 2 fatal error LNK1120: 1 unresolved externals 
....\yaml-cpp_dll\build\test\Debug\run-tests.exe 1


This looks like just not exporting the symbols, a la issue 88.

Original issue reported on code.google.com by jbe...@gmail.com on 28 Feb 2012 at 12:50

@GoogleCodeExporter
Copy link
Author

I fixed it. In include/yaml-cpp/binary.h:

@@ +10,1 @@
+#include "yaml-cpp/dll.h"

@@ -64,1 +64,1 @@
-    void operator >> (const Node& node, Binary& binary);
+    YAML_CPP_API void operator >> (const Node& node, Binary& binary);

Original comment by supsu...@gmail.com on 10 Feb 2013 at 11:35

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by jbe...@gmail.com on 29 Mar 2015 at 7:46

  • Changed state: WontFix
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant