简体   繁体   English

构建 WxWidgets 示例程序时的错误消息

[英]Error message when building WxWidgets sample program

I was trying to follow the instructions here to setup WxWidgets.我试图按照此处的说明设置 WxWidgets。

I've managed to run the commands wx-config --version and wx-config --list but not the commands to compile the minimal example, which are:我设法运行命令wx-config --versionwx-config --list但不是编译最小示例的命令,它们是:

cd gtk-build/samples/minimal make./minimal cd gtk-build/samples/minimal make./minimal

After lots of display messages I arrive at:经过大量显示消息后,我到达:

/usr/bin/ld: cannot find -lwxtiff-3.1
/usr/bin/ld: cannot find -lwxjpeg-3.1
/usr/bin/ld: cannot find -lwxregexu-3.1
collect2: error: ld returned 1 exit status
make: *** [minimal] Error 1
Makefile:149: recipe for target 'minimal' failed
The command '/bin/sh -c make' returned a non-zero code: 2

Did I miss the installation of some library?我错过了一些图书馆的安装吗?

There is a similar question for windows here , but the answers there seem not to apply for linux. windows here 有一个类似的问题,但那里的答案似乎不适用于 linux。

First of all, please look at the official instructions rather than the wiki which may, or not, be up to date.首先,请查看官方说明而不是 wiki,它可能是最新的,也可能不是最新的。

Second, by running make clean you removed the libraries used by the in-tree makefiles.其次,通过运行make clean您删除了树内 makefile 使用的库。 So, unsurprisingly, you can't use them any more, but you can use makefile.unx from the source tree, ie if wx-config is in your PATH , just use make -f makefile.unx in $wx/samples/minimal (and not under gtk-build/samples/minimal ).所以,不出所料,你不能再使用它们了,但你可以使用源代码树中的makefile.unx ,即如果wx-config在你的PATH中,只需在$wx/samples/minimal中使用make -f makefile.unx (而不是gtk-build/samples/minimal下)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM