如何在Windows上使用Eclipse构建wxWidgets

时间:2022-01-02 22:57:02

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?

我在Windows XP SP2上安装了wxWidgets 2.8.9并根据指示构建了库,现在我正在尝试获取Hello World!从Eclipse内部构建教程应用程序,我只是显然缺少一些东西。知道如何让Cygwin,Eclipse和wxWidgets一起玩得很好吗?

2 个解决方案

#1


3  

This answer was posted by Lars Uffmann to the comp.soft-sys.wxwindows newsgroup. In a nutshell:

这个答案由Lars Uffmann发布到comp.soft-sys.wxwindows新闻组。简而言之:

  1. Add c:/cygwin/usr/local/bin to the path in the Eclipse project configuration

    将c:/ cygwin / usr / local / bin添加到Eclipse项目配置中的路径

  2. Add ``wx-config --cxxflags`‘ to the GCC C++ Compiler command

    将“wx-config --cxxflags”添加到GCC C ++编译器命令中

  3. Move the ${FLAGS} variable to the end of the GCC C++ Linker Command Line Pattern

    将$ {FLAGS}变量移动到GCC C ++链接器命令行模式的末尾

  4. Add ``wx-config --libs`‘ to the GCC C++ Linker flags.
  5. 将``wx-config --libs`'添加到GCC C ++链接器标志中。

Thank goodness for Mr. Uffmann sharing this information; this problem has been giving me headaches for days.

感谢Uffmann先生分享这些信息;这个问题让我头疼了好几天。


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.

编辑:请注意,wx-config字符串的每一端都有一个字面反引号。转义反引号的方法似乎无法正常工作。有关确切语法的更多详细信息,请参阅链接的答案。

#2


1  

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.

我自己在Windows上使用MinGW构建了wxWidgets,让CMake 2.6在Windows上为Eclipse创建Makefile和项目文件。这对我很有用。

#1


3  

This answer was posted by Lars Uffmann to the comp.soft-sys.wxwindows newsgroup. In a nutshell:

这个答案由Lars Uffmann发布到comp.soft-sys.wxwindows新闻组。简而言之:

  1. Add c:/cygwin/usr/local/bin to the path in the Eclipse project configuration

    将c:/ cygwin / usr / local / bin添加到Eclipse项目配置中的路径

  2. Add ``wx-config --cxxflags`‘ to the GCC C++ Compiler command

    将“wx-config --cxxflags”添加到GCC C ++编译器命令中

  3. Move the ${FLAGS} variable to the end of the GCC C++ Linker Command Line Pattern

    将$ {FLAGS}变量移动到GCC C ++链接器命令行模式的末尾

  4. Add ``wx-config --libs`‘ to the GCC C++ Linker flags.
  5. 将``wx-config --libs`'添加到GCC C ++链接器标志中。

Thank goodness for Mr. Uffmann sharing this information; this problem has been giving me headaches for days.

感谢Uffmann先生分享这些信息;这个问题让我头疼了好几天。


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.

编辑:请注意,wx-config字符串的每一端都有一个字面反引号。转义反引号的方法似乎无法正常工作。有关确切语法的更多详细信息,请参阅链接的答案。

#2


1  

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.

我自己在Windows上使用MinGW构建了wxWidgets,让CMake 2.6在Windows上为Eclipse创建Makefile和项目文件。这对我很有用。