1

I try to use this library : https://brainflow.readthedocs.io/ (https://github.com/brainflow-dev/brainflow) in my c++ project, handle with qmake. I'm using Qt. I'm on windows 10. I downloaded the library and built it with .\tools\build_win64_vs19.cmd (inside the lib) and then add them to my .pro file like that :

unix|win32: LIBS += -L$$PWD/../../../Desktop/brainflowD/compiled/Debug/ -lBoardController

INCLUDEPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug
DEPENDPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug

unix|win32: LIBS += -L$$PWD/../../../Desktop/brainflowD/compiled/Debug/ -lDataHandler

INCLUDEPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug
DEPENDPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug

unix|win32: LIBS += -L$$PWD/../../../Desktop/brainflowD/compiled/Debug/ -lGanglionLib

INCLUDEPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug
DEPENDPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug

unix|win32: LIBS += -L$$PWD/../../../Desktop/brainflowD/compiled/Debug/ -lMLModule

INCLUDEPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug
DEPENDPATH += $$PWD/../../../Desktop/brainflowD/compiled/Debug

and this line to include headers :

INCLUDEPATH += "C:\Users\fajed\Desktop\brainflowD/installed64/inc"

When i'm trying to use function from the library, i have the following error :

main.obj:-1: erreur : LNK2019: unresolved external symbol "public: static void __cdecl BoardShim::enable_dev_board_logger(void)" (?enable_dev_board_logger@BoardShim@@SAXXZ) referenced in function main

I try a lot of things from others tickets but couldn't make it work. Do you have any idea ?

  • 1
    First, why are there so many duplicated lines in your .pro file? Second, which of those libraries provide this `BoardShim` function? – JarMan Sep 04 '20 at 13:54
  • It's the automated feature "include library" from Qt who add theses lines for each library, i did remove the duplicated ones. BoardShim is part of the BoardController library – Ajeddig Faris Sep 04 '20 at 14:01
  • 1
    Did you build the library yourself? Are you able to verify that BoardController does actually contain that function? – JarMan Sep 04 '20 at 14:09
  • i don't know how to check that. I build the library with the .cmd file made for it – Ajeddig Faris Sep 04 '20 at 14:32
  • If you're on Windows, you can use `dumpbin`. – JarMan Sep 04 '20 at 14:37
  • It's weird it doesn't seem to be in any of the 4 .lib file. I did use the option /EXPORTS with dumpbin, but it looks like each .lib file correspond to a class, and so, does not include BoardShim for example. I'm not sure how .lib file works. Is there others options with dumpbin i should use ? – Ajeddig Faris Sep 04 '20 at 15:14
  • I'm no expert there. Try reading [this](https://stackoverflow.com/questions/305287/how-to-see-the-contents-of-windows-library-lib). – JarMan Sep 04 '20 at 15:35

0 Answers0