如何将参数-fvisibility = default添加到CMAKE? [重复]

问题描述 投票:0回答:1

我需要从qtwebkit获取隐藏的API WebCore。

例如

    QWebPage *page = mainWidget->page();    
    QWebFrame *qtWebFrame = mainWidget->page()->mainFrame();
    QWebFramePrivate *qtWebFramePrivate = qtWebFrame->d;
    WebCore::Frame *frame = qtWebFramePrivate->frame;

    WebCore::DocumentWriter m_writer(frame);
    m_writer.setFrame(frame);
    m_writer.begin(url, false);
    m_writer.setDocumentWasLoadedAsPartOfNavigation();
    m_writer.setEncoding("utf-8", true);    
    m_writer.addData(html ,strlen(html) );
    m_writer.end();

如何导出这个私有WebCore?

c++ qt cmake qtwebkit
1个回答
0
投票

您必须在目标上设置正确的属性:

add_executable(MyTarget ...)

set_target_properties(MyTarget PROPERTIES CXX_VISIBILITY_PRESET default)
© www.soinside.com 2019 - 2024. All rights reserved.