简体   繁体   English

WxGTK无法在Arch Linux下链接

[英]WxGTK won't link under Arch Linux

So I have this Wx application written in C++ that I've tested under Linux Mint, Ubuntu, and even Mac but under Arch Linux it doesn't seem to link correctly. 因此,我有一个用C ++编写的Wx应用程序,我已经在Linux Mint,Ubuntu甚至Mac上进行了测试,但是在Arch Linux下似乎无法正确链接。 I've installed the wxgtk library required and the compilation works fine but when it gets to the linking stage I get a lot of output saying that none of the Wx methods could be found. 我已经安装了所需的wxgtk库,并且编译工作正常,但是当它进入链接阶段时,我得到很多输出,说明找不到Wx方法。 wx-config --libs output looks correct to me so I'm not sure what's causing the problem. wx-config --libs输出对我来说看起来是正确的,所以我不确定是什么引起了问题。 I will post my Makefile if necessary but it seems this issue is only specific to Arch Linux so far. 如有必要,我将发布我的Makefile,但到目前为止,看来此问题仅特定于Arch Linux。

Just in case anyone is bashing their head over this I changed the linker line from 以防万一有人对这个问题b之以鼻,我将链接器行从

g++ `wx-config --libs` -o $(OBJS)

to

g++ -o $(OBJS) `wx-config --libs`

The reason for this is detailed in rodrigo's comment below. 下面的rodrigo的评论中详细说明了其原因。

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

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