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. Qt SharedLibrary + CLR gives '__fastcall' incompatible Warning

Qt SharedLibrary + CLR gives '__fastcall' incompatible Warning

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.1k 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.
  • P Offline
    P Offline
    Pettor
    wrote on last edited by
    #1

    Hi!

    I have started to use QT for a project where there will be a shared library written in C++ for Windows, Linux, OSX, Android etc. This shared library will then be used in a platform specific client that will be using a langauge proper for that platform. Windows will use C#, OSX objective-c and Linux will most likley use a QT based interface.

    So far I have a building environment up and running for Windows. I use a CLR wrapper that uses the unmanaged QT shared library and converts the result to something applicable for the managed C# world. This works fine for x64 without any warnings, but using x86 I get the following warning for 'qchar.h':

    @
    warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall' C:\QT\5.3\msvc2013\include\QtCore\qchar.h 457 1 SharedClientLibrary
    @

    There are a couple of functions there that use QT_FASTCALL and will result in this warning. I have made a test function in the QT library that manipulates a QString and then returns it in std:string format. The C# world have no problem getting the correct result even on x86 where the warnings are printed.

    Is there anyway to fix this and is the convertion to '__stdcall' making it safe?

    Also, how difficult will it be to use this shared library on the platforms? Any experience? The wrapper is a bit messy to have, but otherwise the Windows platform works good I think!

    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