-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Can not use grpc in an export class (my grpc service) #15653
Comments
@jtattermusch / @nicolasnoble : Do either of you have any idea about this issue? @liukaifei : By any chance, did you already workaround this issue? |
I'm not sure I understand the question fully, but it looks like the obvious workaround it to build statically. |
Closing this issue due to no response from the submitter. Please reopen if needed |
According to https://bugs.chromium.org/p/chromium/issues/detail?id=770771#c7 the issue here seems to be that class |
@sreecha I think it is better to reopen the issue, that should be simply solved by adding
to |
# Should this be an issue in the gRPC issue tracker?
Yes
# What version of gRPC and what language are you using?
1.12.x C++
# What operating system (Linux, Windows, …) and version?
Windows 10
# What runtime / compiler are you using (e.g. python version or version of gcc)
MSVC2017
# What did you do?
I am trying to build my grpc service in dll
# What did you expect to see?
I want to be ok
# What did you see instead?
## 1. use __declspec(dllexport) : error C2280
![image](https://user-images.githubusercontent.com/3362645/41015259-1724838a-697c-11e8-930c-0486112006f1.png)
**## 2. do not use __declspec(dllexport) : ok
![image](https://user-images.githubusercontent.com/3362645/41015415-cf1890e4-697c-11e8-88e7-042a0decf6c2.png)
# Anything else we should know about your project / environment?
I use static grpc, protobuf, my proto library. I want my grpc service class as an export class in dll
Is there any better advice?
The text was updated successfully, but these errors were encountered: