Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding Qt libraries to existing game engine

Adding Qt libraries to existing game engine

Scheduled Pinned Locked Moved Unsolved General and Desktop
game enginetesseract
1 Posts 1 Posters 791 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Illogica
    wrote on last edited by
    #1

    Hello,
    I would like some advice on how I should proceed.
    I'm trying to add Qt bindings to the Tesseract engine . The engine is basically mostly graphics, I want to try and expand the server side using Qt.
    I successfully ported the Makefile to qmake, (and it was quite an endeavor by itself...).
    Now I need to exchange data between Tesseract and Qt, so I'm trying to #include Qt in the Tesseract source files, but Tesseract uses a lot of globals and I get a crazy amount of errors like this:

    In file included from ../tesseract-nightly2/src/qt/bridge.h:16:0,
                     from ../tesseract-nightly2/src/qt/hooks.h:5,
                     from ../tesseract-nightly2/src/qt/hooks.cpp:1:
    ../tesseract-nightly2/src/shared/tools.h: In function 'void* operator new(size_t, void*)':
    ../tesseract-nightly2/src/shared/tools.h:36:14: error: redefinition of 'void* operator new(size_t, void*)'
     inline void *operator new(size_t, void *p) { return p; }
                  ^
    In file included from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_construct.h:59:0,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_tempbuf.h:60,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_algo.h:62,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/algorithm:62,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/qglobal.h:85,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/qcoreapplication.h:37,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/QCoreApplication:1,
                     from ../tesseract-nightly2/src/qt/hooks.h:4,
                     from ../tesseract-nightly2/src/qt/hooks.cpp:1:
    E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/new:146:14: note: 'void* operator new(std::size_t, void*)' previously defined here
     inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                  ^
    In file included from ../tesseract-nightly2/src/qt/bridge.h:16:0,
                     from ../tesseract-nightly2/src/qt/hooks.h:5,
                     from ../tesseract-nightly2/src/qt/hooks.cpp:1:
    ../tesseract-nightly2/src/shared/tools.h: In function 'void* operator new [](size_t, void*)':
    ../tesseract-nightly2/src/shared/tools.h:37:14: error: redefinition of 'void* operator new [](size_t, void*)'
     inline void *operator new[](size_t, void *p) { return p; }
                  ^
    In file included from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_construct.h:59:0,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_tempbuf.h:60,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/stl_algo.h:62,
                     from E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/algorithm:62,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/qglobal.h:85,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/qcoreapplication.h:37,
                     from ../../../Qt/5.6/mingw49_32/include/QtCore/QCoreApplication:1,
                     from ../tesseract-nightly2/src/qt/hooks.h:4,
                     from ../tesseract-nightly2/src/qt/hooks.cpp:1:
    E:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/new:148:14: note: 'void* operator new [](std::size_t, void*)' previously defined here
     inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
    [...]
    

    How would you suggest I go on? Is there some way I could try to avoid these collisions between Tesseract sources and Qt? Can you eventually point me to some work somewhat similar to what I'm trying to achieve?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved