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>
and i have this piece of code:
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;
usualy i use “-lmarkdown” flag to compile it (for discount shared library). but in Qt i dont know how. i tried
QMAKE_LFLAGS += -lmarkdown
and
unix|win32: LIBS += -lmarkdown
but didn’t work. Error messages:
undefined reference to `mkd_string(char const*, int, unsigned int)'
undefined reference to `mkd_compile(void*, unsigned int)'
etc...
any help?