gpt4 book ai didi

c++ - wxWidgets:对 wxURL 的 undefined reference

转载 作者:行者123 更新时间:2023-11-30 04:34:30 25 4
gpt4 key购买 nike

当我创建一个 wxURL 对象时,我得到一个 undefined reference 错误:

#include <wx/url.h>

....

wxURL url(L"http://site.com/file.txt");

)]+0x8d)||undefined reference to `wxURL::wxURL(wxString const&)'|
)]+0xba)||undefined reference to `wxURL::~wxURL()'|
)]+0x15e)||undefined reference to `wxURL::~wxURL()'|

为什么会这样?

最佳答案

当你编译你的代码时,你是否也链接了相应的.cpp文件/库(与wxURL相关)?这很重要,因为您的错误是链接时间

关于c++ - wxWidgets:对 wxURL 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5945756/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com