Results 1 to 10 of 10

Thread: Qt for Excel/VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt for Excel/VBA

    he's compiling .c files as c code. There is no (c++) mangling.



    Quote Originally Posted by Nightfox View Post
    There's no .a file?! .a is the extension of a static library, I'm compiling both as shared .dll
    Debug/Release mode is irrelevant for this comparison.
    Look, my problem is to figure out why Excel/VBA will accept the VC6 .dll and not the Qt .dll. They should be exactly the same but they're not.
    There IS a .a file in your qt release folder that contains the .dll. This is probably analogous to the .lib file that msvc c++ compiler makes when building a .dll that has exported symbols.

    As for debug/release... I find that when you try to tackle a problem it helps to reduce all controllable differences. The fact that these should have been built with different CRT could be a crucial factor. You can't know for sure until you *eliminate* it as a variable. Please, if you are going to pedal the line 'they should be exactly the same', let's not overlook something as significant as debug vs release.
    Last edited by amleto; 12th December 2012 at 22:57.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  2. #2
    Join Date
    May 2009
    Location
    Copenhagen
    Posts
    50
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt for Excel/VBA

    Quote Originally Posted by d_stranz View Post
    Why do you think they should be exactly the same? You're using two different compilers, which more than likely have different conventions for the name mangling that occurs during compilation.
    Although it's posible to export C++ functions from a DLL, I want to avoid doing so because it doesn't have the well defined application binary interface that C does. Which is why I'm using .C files as pointed by amleto.

    Quote Originally Posted by d_stranz View Post
    A second issue is that a Qt DLL needs a running QApplication event loop in order to receive and process Qt events. This certainly isn't being supplied by VBA, so where is it coming from?
    Please note that the source code doesn't contain any QObjects so no event loop needed.

    Quote Originally Posted by amleto View Post
    Please, if you are going to pedal the line 'they should be exactly the same', let's not overlook something as significant as debug vs release.
    You're absolutely right, all stones should be turned. I compiled the Qt source in debug mode but still no success.

    I had a closer look to the dependency walker. The VC6 (VC6DLL4VBA.dll) has a size of 201KB where the Qt (QTDLL4VBA.dll) only has a size of 19KB. Both in debug mode. The significant size difference made me look closer to dependency walker and at first sight, both of the libraries depend on KERNEL32 and USER32, but Qt depends on a third library that VC6 doesn't - the Microsoft C run time library (MSVCRT.DLL). I don't know why it's included in the Qt dll and not in the VC6?
    But more interesting, it seem like the KERNEL32 include from the VC6 dll contain way more functions than the Qt dll that only contains two? WTF!?? Why am I only including a fraction of the KERNEL32? Seems like I'm opening a wormbox!

    Any ideas to progress from here?

Similar Threads

  1. Qt and Excel
    By eltecprogetti in forum Qt Programming
    Replies: 7
    Last Post: 13th March 2012, 12:04
  2. Excel and Qt
    By antialias in forum Qt Programming
    Replies: 10
    Last Post: 29th October 2011, 11:42
  3. Trying to export to Excel
    By ShamusVW in forum Qt Programming
    Replies: 7
    Last Post: 4th August 2010, 08:07
  4. Read excel
    By psipsi in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 17:07
  5. Excel using Qt
    By nmn in forum Qt Programming
    Replies: 3
    Last Post: 28th July 2007, 02:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.