i’m working on project that uses discount library.
http://www.pell.portland.or.us/~orc/Code/discount/
i installed the library on my machine and included:
#include <mkdio.h>
#include <mkdio.h>
To copy to clipboard, switch view to plain text mode
and i have this piece of code:
MMIOT* document = 0;
char* result;
if (!sourceMarkdown.endsWith('\n'))
sourceMarkdown.append('\n');
document = mkd_string(data,data.length(),MKD_NOPANTS);
mkd_compile(document,MKD_NOPANTS);
mkd_document(document,&result);
return renderedHtml;
MMIOT* document = 0;
char* result;
QString sourceMarkdown(markdown);
if (!sourceMarkdown.endsWith('\n'))
sourceMarkdown.append('\n');
QByteArray data = sourceMarkdown.toUtf8();
document = mkd_string(data,data.length(),MKD_NOPANTS);
mkd_compile(document,MKD_NOPANTS);
mkd_document(document,&result);
QString renderedHtml = QString::fromUtf8(result);
return renderedHtml;
To copy to clipboard, switch view to plain text mode
usualy i use “-lmarkdown†flag to compile it (for discount shared library). but in Qt i dont know how.
i tried
QMAKE_LFLAGS += -lmarkdown
QMAKE_LFLAGS += -lmarkdown
To copy to clipboard, switch view to plain text mode
and
unix|win32: LIBS += -lmarkdown
unix|win32: LIBS += -lmarkdown
To copy to clipboard, switch view to plain text mode
but didn’t work.
any help?
Bookmarks