Search code examples
c++linuxwxwidgetsarchlinux

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. 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. wx-config --libs output looks correct to me so I'm not sure what's causing the problem. I will post my Makefile if necessary but it seems this issue is only specific to Arch Linux so far.


Solution

  • Just in case anyone is bashing their head over this I changed the linker line from

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

    to

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

    The reason for this is detailed in rodrigo's comment below.