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

How to build and user ponder with windows7? #127

Open
acyyhaa opened this issue Apr 26, 2022 · 3 comments
Open

How to build and user ponder with windows7? #127

acyyhaa opened this issue Apr 26, 2022 · 3 comments

Comments

@acyyhaa
Copy link

acyyhaa commented Apr 26, 2022

I want to build ponder for visual studio 2019

@billyquith
Copy link
Owner

What is stopping you from doing that?

@thegoodtgg
Copy link

I also failed to build ponder-v3.0.0 on visual studio 2019. Then I tried to build it on visual studio 2015 and it also failed. The error happened while building the "args.cpp".
I think it failed on forward declaration for "ponder::Value". Then I digged into source then find that "ponder::Value" dependent on "ponder::UserObject", "ponder::UserObject" dependent on "ponder::Args" and "ponder::Value", "ponder::Args" dependent on "Ponder::Value". So @billyquith used forward declaration in the "args.hpp" for "ponder::Value".
However, I don't understand how std::vector instantiate while missing "ponder::Value" definition.

1>args.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(1279): error C2036: 'const ponder::Value *': unknown size
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(1276): note: while compiling class template member function 'void std::vector<ponder::Value,std::allocator<_Ty>>::push_back(const ponder::Value &)'
1> with
1> [
1> _Ty=ponder::Value
1> ]
1>D:\third-party\C++\common\reflection\ponder-3.0.0\src\args.cpp(63): note: see reference to function template instantiation 'void std::vector<ponder::Value,std::allocator<_Ty>>::push_back(const ponder::Value &)' being compiled
1> with
1> [
1> _Ty=ponder::Value
1> ]
1>D:\third-party\C++\common\reflection\ponder-3.0.0\include\ponder/args.hpp(143): note: see reference to class template instantiation 'std::vector<ponder::Value,std::allocator<_Ty>>' being compiled
1> with
1> [
1> _Ty=ponder::Value
1> ]
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(1285): error C2036: 'ponder::Value *': unknown size
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(1294): error C2036: 'ponder::Value *': unknown size
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(1296): error C2036: 'ponder::Value *': unknown size

@thegoodtgg
Copy link

I try the code below. It do failed.

`
// Foo.h
#pragma once
struct Foo {
int v_;
}

// FooList.h
#pragma once
#include

struct Foo;
struct FooList {
void push_back(Foo &f);

std::vector<Foo> vec_foo_;

};

// FooList.cpp
#include "FooList.hpp"
#include "Foo.hpp"

void FooList::push_back(Foo &f) {
vec_foo_.push_back(f);
}

// main.cpp
#include "FooList.hpp"

int main(int argc, char **argv) {
FooList list;
return 0;
}
`

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

No branches or pull requests

3 participants