-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
cmake with mingw64 make #1072
Comments
Can you provide your full command line, and OS and version, etc.? |
Hi, I meet the same issue. |
I have the same problem. I am building on Windows 10 with mingw. My build commands are as follows: git clone https://github.com/jbeder/yaml-cpp.git
cd yaml-cpp
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
make
make install When I execute "make" I get the errors as listed in the OP. Then, when I try to build another project (a Qt project with qmake) that links to the libyaml-cpp.a library, I get a large amount of linking errors:
I checked the |
I also encountered this problem. Have you solved it? Can you tell me the solution |
Hi! I have the same problem. Do you have the solution now? |
Hi! #if WIN32
#define YAML_CPP_STATIC_DEFINE
#endif
#include "yaml-cpp/yaml.h" I hope it helps. |
Yup, this fixed it for me, thanks! |
Hi! Just for information it works for me with 'MSYS Makefiles' under MSYS2.
Hope this help. |
hi all,I meet the same problem on win10 |
it works for me , thank you! |
I think this was fixed by #1117. I'm closing this, but feel free to reopen if necessary testing against the latest release. |
thank you ! i have solved this issue from your solution. |
hi, defining YAML_CPP_STATIC_DEFINE before inclusion also worked for me, but I wanted to point out that I had the same issue when using version 0.8.0
|
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:19:8: error: 'YAML::Node::Node()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline Node::Node()
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:45:8: error: 'YAML::Node::Node(const YAML::Node&)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline Node::Node(const Node&) = default;
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:47:8: error: 'YAML::Node::Node(YAML::Node::Zombie)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline Node::Node(Zombie)
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:56:8: error: 'YAML::Node::~Node()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline Node::~Node() = default;
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:68:13: error: 'bool YAML::Node::IsDefined() const' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline bool Node::IsDefined() const {
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:82:24: error: 'YAML::NodeType::value YAML::Node::Type() const' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline NodeType::value Node::Type() const {
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:166:27: error: 'const string& YAML::Node::Scalar() const' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline const std::string& Node::Scalar() const {
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:209:14: error: 'YAML::Node& YAML::Node::operator=(const YAML::Node&)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline Node& Node::operator=(const Node& rhs) {
^~~~
D:/mingw64lib/YAML_CPP/include/yaml-cpp/node/impl.h:254:13: error: 'void YAML::Node::AssignNode(const YAML::Node&)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline void Node::AssignNode(const Node& rhs) {
The text was updated successfully, but these errors were encountered: