kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Cannot use yaml-cpp.dll #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run cmake to generate a Visual Studio 9 2008 project
2. Open in VS, build, see the .dll, but no import lib.
3.

What is the expected output? What do you see instead?
I expected an import .lib + .dll or a static lib.  I saw a .dll with no
import .lib.  The reason is that non of the classes are marked as
exportable via declspec.

What version of the product are you using? On what operating system?

Please provide any additional information below.
I made a different build for a static lib within VS, but don't know how to
force CMAKE to do so.

Original issue reported on code.google.com by tim.fi...@gmail.com on 4 Nov 2009 at 8:49

GoogleCodeExporter commented 8 years ago
I suppose if I had just opened the included solution that builds a static lib, I
would've been fine, sheesh.  But, in all fairness, I had earlier done a cmake 
of it
for a mingw build, so I figure I needed to without looking.

Regards,
Tim

Original comment by tim.fi...@gmail.com on 4 Nov 2009 at 10:22

GoogleCodeExporter commented 8 years ago
What exactly is an "import" library? I've never actually worked with .dlls in
Windows, so I'm not really sure what the procedure is. Does this mean that you
wouldn't be able to link to the .dll unless I added __declspec to a bunch of 
stuff?

Original comment by jbe...@gmail.com on 4 Nov 2009 at 11:01

GoogleCodeExporter commented 8 years ago
Heh, yeah, windows is fun!  Yes, you have a long way to go if you want to use
yaml-cpp as a .dll.  Every class that is exported needs the declspec crap and 
all
their the inherited classes.  Even worse, all of the STL members need similar . 
 It's
probably better to just support a static lib using MSVC.

http://msdn.microsoft.com/en-us/library/d14wsce5.aspx   

http://support.microsoft.com/default.aspx?scid=KB;EN-US;168958  

Original comment by tim.fi...@gmail.com on 4 Nov 2009 at 11:13

GoogleCodeExporter commented 8 years ago
Hmmm... this seems like a lot more work than I'd like to do right now. I may 
return to 
this idea in the future, but for now I'm marking it "WontFix".

Thanks!

Original comment by jbe...@gmail.com on 6 Nov 2009 at 3:32