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 use qtprotobuf 0.6.0 Windows release #251

Open
cooked opened this issue Oct 30, 2021 · 3 comments
Open

How to use qtprotobuf 0.6.0 Windows release #251

cooked opened this issue Oct 30, 2021 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@cooked
Copy link

cooked commented Oct 30, 2021

Hi,
I'm trying to build an app on Windows using the qtprotobuf libs/includes provided in the 0.6.0 release.
I'm building using qmake and msvc2019.

I can't get past the following linker error (uart_messages originates from my proto)
uart_messages.qpb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::list<class std::function<void __cdecl(void)>,class std::allocator<class std::function<void __cdecl(void)> > > & __cdecl QtProtobuf::registerFunctions(void)" (__imp_?registerFunctions@QtProtobuf@@YAAEAV?$list@V?$function@$$A6AXXZ@std@@V?$allocator@V?$function@$$A6AXXZ@std@@@2@@std@@XZ) not resolved in function "void __cdecl dynamic initializer for 'ProtoTypeRegistrarCommand''(void)" (??__EProtoTypeRegistrarCommand@@yaxxz)`

in the .pro file I have the following
INCLUDEPATH += $$PWD/modules/qtprotobuf-0.6.0/include/QtProtobufProtobuf
LIBS += -L$$PWD/modules/qtprotobuf-0.6.0/lib -lQt5Protobuf -lQt5ProtobufQtTypes -lQt5ProtobufWellKnownTypes

what am I missing? is this error maybe cause by some sort of name mangling?

hope someone can help

cheers
stef

@cooked cooked added the question Further information is requested label Oct 30, 2021
@semlanik
Copy link
Owner

semlanik commented Nov 2, 2021

Hi @cooked , weird, Qt5Protobuf.lib should contain this symbol exported.

@cooked
Copy link
Author

cooked commented Nov 2, 2021

Hi @semlanik do you think that might be that I'm building with msvc2019 and maybe the lib was built with a different version?

@semlanik
Copy link
Owner

semlanik commented Nov 2, 2021

Need to check, CI check is poor and doesn't have the external usage check. So there might be issues in the library it self. I will try to check once have powers.

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

No branches or pull requests

2 participants