Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build mysql driver with libmysqld.lib in vc2010 causes memory access violation
Forum Updated to NodeBB v4.3 + New Features

Build mysql driver with libmysqld.lib in vc2010 causes memory access violation

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 1.6k Views 1 Watching
  • 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.
  • G Offline
    G Offline
    galrub
    wrote on last edited by
    #1

    hello,

    when I build both release and debug MySQL drivers (plugin) with libmysql
    @
    LIBS += -L$$MYSQLDIR/lib/ -llibmysql
    @

    everything works fine, but when I try using libmysqld (for the debug version only)
    I get a memory access violation from line 1272 in qsql_mysql.cpp in open() method.

    should I pass any precompile flag or something to make it work?

    *and another question, has anyone been able to actually use the MySQL embedded option? if so, can u share some code,
    compiling is successful but connection is impossible ☹
    THX

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rcari
      wrote on last edited by
      #2

      Are you sure all your libraries were compiled against the same Visual Studio Runtime? Check for version and make sure you use SHARED DEBUG and not STATIC DEBUG in your link flags for all the libraries.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        galrub
        wrote on last edited by
        #3

        Yes, all libraries are from the same package, so we can assume they where all compiled the same,
        i.e. all dynamically linked.

        THX

        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