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

Building protoc using MSVS projects doesn't work: Ruby-related link error. #184

Closed
vadz opened this issue Jan 30, 2015 · 5 comments
Closed

Comments

@vadz
Copy link

vadz commented Jan 30, 2015

With the current (8ccaa42) sources, protoc doesn't link as the project doesn't include ruby_generator.cc but google::protobuf::compiler::ruby::Generator is unconditionally referenced in main.cc. Unfortunately fixing this is not as easy as just adding this file to the project as it doesn't compile with MSVS (tons of errors, didn't have time to really look at them and it was simpler to just disable Ruby generation for me).

@cfallin
Copy link
Contributor

cfallin commented Jan 30, 2015

Hi @vadz, I don't have access to Visual Studio at the moment, but could you copy/paste the errors you're seeing so that I have some idea of what we're looking at? Thanks!

@vadz
Copy link
Author

vadz commented Jan 30, 2015

Here they are:

1>ClCompile:
1>  ruby_generator.cc
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(50): error C2065: 'uint32_t' : undeclared identifier
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(50): error C2146: syntax error : missing ')' before identifier 'value'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(50): error C2059: syntax error : ')'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2065: 'uint32_t' : undeclared identifier
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2146: syntax error : missing ')' before identifier 'value'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2374: 'google::protobuf::compiler::ruby::IntToString' : redefinition; multiple initialization
1>          ...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(50) : see declaration of 'google::protobuf::compiler::ruby::IntToString'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2059: syntax error : ')'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2143: syntax error : missing ';' before '{'
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(67): error C2447: '{' : missing function header (old-style formal list?)
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(119): error C3861: 'IntToString': identifier not found
1>...\protobuf\src\google\protobuf\compiler\ruby\ruby_generator.cc(156): error C3861: 'IntToString': identifier not found

@cfallin
Copy link
Contributor

cfallin commented Jan 30, 2015

This is an issue caused by using uint32_t instead of uint32. Sorry about that.

PR #183 is addressing this issue.

@ennerf
Copy link
Contributor

ennerf commented Feb 1, 2015

@cfallin Unfortunately I saw the PR too late. PR #186 addresses the type issue, as well as the vc project file includes.

@haberman
Copy link
Member

haberman commented Jul 7, 2015

Looks like this was fixed a while ago. I'll close this for now -- please re-open if it is still an issue.

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

4 participants