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. QLibrary - resolve a char*
Forum Updated to NodeBB v4.3 + New Features

QLibrary - resolve a char*

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.5k 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
    goocreations
    wrote on last edited by
    #1

    I'm using QLibrary to load a library (FLAC) during runtime. I've managed to resolve the "extern" functions and use them.
    However I'm now trying to resolve a char*, not a function. The extern statement in FLAC's header file:

    @extern FLAC_API const char *FLAC__VENDOR_STRING;@

    And I'm trying to resolve it as follows:

    @char versionString;
    if((versionString = (char
    ) mLibrary.resolve("FLAC__VERSION_STRING")) != NULL)
    {
    cout<<versionString<<endl;
    }@

    The output statement is printed, meaning it could be resolved, however the string that is printed only contains a couple of weird characters (which change with each execution of my program).

    Does anyone now what I'm doing wrong?

    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