我在 Windows XP SP2 机器上安装了 wxWidgets 2.8.9 并根据说明构建了库,现在我正在尝试获取 世界你好! 教程 应用程序从 Eclipse 中构建,但我显然错过了一些东西。 知道如何让 Cygwin、Eclipse 和 wxWidgets 很好地协同工作吗?
I installed wxWidgets 2.8.9 on a Windows XP SP2 box and built the library according to the directions and now I'm trying to get the Hello World! tutorial app to build from within Eclipse and I'm just missing something apparently. Any idea how to get Cygwin, Eclipse and wxWidgets to play nice together?
发布评论
评论(2)
此答案由 Lars Uffmann 发布到 comp.soft-sys.wxwindows 新闻组。 简而言之:
将 c:/cygwin/usr/local/bin 添加到 Eclipse 项目配置中的路径
移动 ${FLAGS} 变量到
GCC C++ 链接器命令结束
线条图案
C++ 链接器标志。
感谢乌夫曼先生分享这些信息; 这个问题已经让我头疼好几天了。
编辑:请注意,wx-config 字符串的每一端都有一个反引号。 转义反引号的方法似乎无法正常工作。 有关确切语法的更多详细信息,请参阅链接的答案。
This answer was posted by Lars Uffmann to the comp.soft-sys.wxwindows newsgroup. In a nutshell:
Add c:/cygwin/usr/local/bin to the path in the Eclipse project configuration
Add ``wx-config --cxxflags`‘ to the GCC C++ Compiler command
Move the ${FLAGS} variable to the
end of the GCC C++ Linker Command
Line Pattern
C++ Linker flags.
Thank goodness for Mr. Uffmann sharing this information; this problem has been giving me headaches for days.
EDIT: Note that there is a literal backtick at each end of the wx-config strings. The method of escaping the backtick doesn't seem to work correctly. Refer to the linked answer for more details on exact syntax.
我自己在 Windows 上使用 MinGW 构建了 wxWidgets,并让 CMake 2.6 在 Windows 上为 Eclipse 创建 Makefile 和项目文件。 这对我来说效果很好。
I built wxWidgets with MinGW on Windows myself and let CMake 2.6 create the Makefiles and project files for Eclipse on Windows. This works pretty well for me.