回复:Gentoo Linux Ebuild
原始发布页
打开来源页面查看 1 个交叉存档
试试 -datadir=
上次我尝试 $(shell /usr/bin/wx-config) 时,立刻就有人嚷嚷它会造成构建问题。当时没有时间调查。
$(shell /usr/bin/wx-config) 的一个问题是,它会选中碰巧存在的任意 wxWidgets 版本(wx 2.8)和任意配置(非 UTF-8)。-lwx_gtk2ud-2.9 只匹配正确的配置。如果 wxWidgets 是用错误的配置构建的,它就会失败。
引用
如果我没记错,在 freenode 的 #wxwidgets 里聊天时,那里的开发者很不理解为什么要这样用。
他们有没有说为什么不理解?
引用
这是因为在我的系统上,路径是 /usr/include/wx-2.9/wx/wx.h
它为什么会在那里?是操作系统自带的,还是你必须自己构建它?如果是你构建的,我不明白它为什么会把自己放到不同的位置。
wxWidgets 2.9 终于开始以 debian 软件包的形式提供了吗?
也许我们应该这样做:
INCLUDEPATHS= \
-I"/usr/local/include/wx-2.9" \
-I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" \
-I"/usr/include/wx-2.9" \
-I"/usr/lib/wx/include/gtk2-unicode-debug-static-2.9"再说一次,这些路径有助于确保只使用 2.9,遇到 2.8 时则会失败。
wxWidgets 2.8 有 ANSI 和 UTF-16 两种版本,两者都不适合我们。它很诱人,因为非常容易以软件包的形式获得;很多人都为此感到沮丧,直到我们开始在 makefile 中硬编码 2.9。
英文原文
展开英文原文
Try -datadir=
Last time I tried $(shell /usr/bin/wx-config), there was immediate hollering about build problems with it. There wasn't time to investigate at the time.
One problem with $(shell /usr/bin/wx-config) is it will pick up any version (wx 2.8 ) and any configuration (non-UTF-8 ) of wxWidgets that happens to be there. -lwx_gtk2ud-2.9 only matches the right configuration. It fails if wxWidgets was built with the wrong configuration.
Quote
Iirc, chatting in #wxwidgets on freenode, the devs there were baffled why that was used.
Did they say why they were baffled?
Quote
This is because on my system the path is /usr/include/wx-2.9/wx/wx.h
Why is it there? Was it included by the OS, or did you have to build it? If you built it, I wonder why it would put itself in a different place.
Has wxWidgets 2.9 finally started to become available as a debian package?
Maybe we should do this:
INCLUDEPATHS= \ -I"/usr/local/include/wx-2.9" \ -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" \ -I"/usr/include/wx-2.9" \ -I"/usr/lib/wx/include/gtk2-unicode-debug-static-2.9"
Again, those paths help make sure it's only 2.9 and will fail with 2.8.
wxWidgets 2.8 comes in ANSI and UTF-16, both wrong for us. It's tempting because it's so easily available as a package; a lot of people were frustrated by it until we started hardcoding 2.9 into the makefile.