Help to build a binary (Win32)



  • I'm trying to build a binary from here (v. 1.2).

    It's markdown editor, the best for Windows (from my point of view)

    • fast
    • BSD 3-Clause License
    • side-by-side instant preview
    • it can parse Markdown inside HTML blocks (if you choose MultiMarkdown in the preferences)
    • you may specify your own CSS styles
    • projects
    • TOC (in version 1.2)

    Unfortunately, the development was discountinued in 2014 year.

    The version 1.0.0 doesn't have TOC functionality. But, it was added in next 1.2 release. Unfortunately, version 1.2 exist only as source files, no Windows binaries are presented in project's page.

    Here is quote from project's page:

    Build:

    • check out git checkout git@github.com:zhangshine/MdCharm.git
    • Open "MdCharm.pro" by Qt Creator and click "Build"

    I tried to download QT Creator and build myself, but since I'm not a programmer, I just lost 2 days. (I know something about HTML/CSS/JS, but nothing about C++ and QT).

    If it really easy deal for somebody here, maybe you can create Win32 binary and place it on GitHub or anywhere else?



  • Hi!
    I haven't had time to try building it myself as I am currently on the road. However, a few pointers that might help you:

    • Judging by the readme.md, you will have to build the Windows version using Qt 4.7. I assume that you simply installed the most recent version of Qt and that readme seems to imply that you won't be able to build the Windows binary with that. The current Qt installer doesn't offer installing a Qt version less than 5. You might have to check the wiki to figure out how to do so.
    • It looks like that project is using the webkit which was called QtWebKit back in Qt 4.7 days. Most likely you will have to manually install that too.

    I hope that helps somehow.



  • Yes, thanks to StackOverflow (1, 2), I realized yesterday, that I need QT 4.7+, but not 5.

    Using online installer I successfully installed 4.8.7 yesterday, so it's not a problem:

    alt text

    But when I try to compile... I don't understand anything, get errors, and so on.


  • Moderators

    @John-C said in Help to build a binary (Win32):

    But when I try to compile... I don't understand anything, get errors, and so on

    post them and you might get help faster.



  • WOW, building it wasn't easy at all, the project is quite messy.

    I uploaded the binaries for 32bit windows based on Qt5.5 here: http://filenurse.com/download/a5aa3139359f42e9b7465f6806db5622.html
    They will be available for 7 days only.
    If it's missing any plugin or library let me know and I'll retry the deployment

    WARNING this is a huge leap of faith you are taking here. you should never download binaries supplied directly by strangers on the internet! download only if you are 100% convinced that after all I'm a good guy and did not sneak anything dodgy in there


  • Qt Champions 2016

    @VRonin
    Super. Cool. It was pretty nested. Did you use VS or mingw?
    Any change to also share the project?

    Note: running on win 10. (qt 5.7 installed)
    Complains about
    Qt5Sensors
    Qt5Multimediawidgets
    Qt5OpenGl
    Qt5Multimedia



  • MSVC2013 on Win7 Qt 5.5.1 for me it was complaining about:

    • MarkdownToHtmlResult::ERROR name conflict, refactored to MarkdownToHtmlResult::mthrERROR
    • QRegularExpression being defined as an internal item rather than using Qt5 class
    • version_h.py is invalid (Python 3.5.2)
    • zlib was not linked... I had to add it manually (and yes, I hard coded the path to my build of zlib in MdCharm.pro file)

    You need to have the paths to python and git in PATH before running Qt Creator

    I also got rid of the QtCore/ in the includes as I hate them

    I forked it here: https://github.com/VSRonin/MdCharm

    My buld steps:

    pushd C:\
    CALL "C:/Qt/5.5/msvc2013/bin/qtenv2.bat"
    CALL "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat"
    popd
    echo on
    set PATH=C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Python\Python35-32;%PATH%
    qmake
    nmake
    

    What you need to change:

    • lines 29, 30, 32 and 34 of MdCharm.pro should contain the path to your binary version of zlib (I used the static one but you can download the pre-compiled dll)
    • in the batch script above the path to the binaries

    I did not even start with Qt 5.7 as I don't have QtWebKit compiled for that version

    P.S.
    Why would you even need python?!


  • Qt Champions 2016

    im glad i didn't try with mingw. Why does it need git?
    And really good work :)



  • @mrjj said in Help to build a binary (Win32):

    Why does it need git?

    At linking error number 1556 I stopped asking this kind of questions



  • @VRonin Thank you very much for help!

    Yes, there are some problems with libraries.

    When I tried to launch exe file, I get the error:

    The program can’t start because Qt5Sensors.dll is missing from your computer.

    Well, after that I found the file with the same name in my C:\Qt directory, and I copied it into MdCharm folder. After that, I tried to launch exe file again, but now it requires libwinpthread-1.dll. Okay, I found this file, too, in my Qt directory. Totally, it was error messages about 4 missing files:

    • Qt5Sensors.dll
    • libgcc_s_dw2-1.dll
    • libwinpthread-1.dll
    • libstdc++-6.dll

    After I copied all these files from Qt directory[^1] to MdCharm directory, and tried to launch exe file again, I get the new error message:

    The procedure entry point _Z5qHashRK10QByteArrayj could not be located in the dynamic link library Qt5Core.dll

    [^1]: To be precise, these 4 files were found in many different directories. For example, Qt5Sensors.dll was found in 6 different directories:

    alt text



  • I compiled using 5.5/msvc2013/bin so use everything from that folder



  • @VRonin Thank you very much again! :-) Yes, now it works. Great! :-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.