Jump to content

Photo

Linking with protobuf in Qt Creator


2 replies to this topic

#1 Luigi301 OFFLINE  

Luigi301

    Moonsweeper

  • 372 posts

Posted Tue Oct 17, 2017 11:01 PM

I'm working on a little project and I need to link RespeQt with protobuf. I'm running Windows 10 and using Qt Creator. I installed Qt 5.8.0.

 

I installed MSYS2 32-bit and set it up with Qt's mingw mounted and using its GCC. I compiled the protobuf library from source and installed it to mingw's /lib directory. I added it to the project in Qt Creator:

LIBS += -L"C:\Qt\Qt5.8.0\Tools\mingw530_32\lib" -lprotobuf
INCLUDEPATH += "C:\Qt\Qt5.8.0\Tools\mingw530_32\include"

But it doesn't seem to be linking it. I get a million undefined reference errors when I try to use any of the protobuf functions. What do I need to do to get it to link properly with the Qt mingw environment?



#2 TheMontezuma ONLINE  

TheMontezuma

    Dragonstomper

  • 676 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Wed Oct 18, 2017 12:51 PM

I haven't tried it and it is likely that you have already done it, but my idea would be to make sure that you have fully re-built the project (to be 100% sure, delete the output folder).



#3 Luigi301 OFFLINE  

Luigi301

    Moonsweeper

  • Topic Starter
  • 372 posts

Posted Wed Oct 18, 2017 7:02 PM

I ended up getting it compiling in an Ubuntu VM. I was able to link against protobuf there.





Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users