尝试在WXWIDGETS 3.1.1中构建Freechart项目时,wx_shared = 0
我想知道是否有人可以帮助我..
我遇到了一个问题,试图构建'Freechart'图表小部件,可从这里下载:
https://sourceforge.net/projects/wxcode/files/files/components/wxfreechart/
项目:“ Freechart-1.6.zip”
我使用的是WIDGES 3.1.1与GCC编译器。我已经使用以下构建命令使用wx_shared = 1构建了它:
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=1 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
它构建和以下.a and .dll文件是在lib/gcc_dll文件夹中生成的:
- libwxcode_msw31ud_freechart.a
- em> libwxcode_msw31ud_msw31ud_freechart.a 。
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=0 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud
C:\wxWidgets-3.1.1\lib\gcc_dll
可以在CodeBlocks中打开,因此,小部件libwxmsw31ud.a在项目/构建选项/链接器设置中无法设置文件。 Freechart是在命令提示符中内置的。我不确定如何告诉编译器在哪里可以找到此文件。
正如我所说,该构建可用于共享= 1。任何输入都将不胜感激。
保罗
I wonder if anyone can help me..
I'm having a problem trying to build 'Freechart' charting widget, downloadable from here:
https://sourceforge.net/projects/wxcode/files/Components/wxFreeChart/
Project: 'freechart-1.6.zip'
I'm using widgets 3.1.1 with a GCC compiler. I've built it with WX_SHARED=1, using the following build command:
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=1 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
It builds and the following .a and .dll files are generated in the lib/gcc_dll folder:
- libwxcode_msw31ud_freechart.a
- libwxcode_msw31ud_freechart.dll
However, when I try to build it with SHARED=0, using:
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=0 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
It throws the error:
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud
The file exists in the widgets 3.1.1 lib directory, here:
C:\wxWidgets-3.1.1\lib\gcc_dll
There isn't an actual project file for freechart that can be opened in codeblocks, So, the widgets libwxmsw31ud.a file can't be set in the Project/Build options/Linker settings. Freechart is built in the command prompt. I'm not sure how to tell the compiler where to find this file.
As I said, the build works with SHARED=1. Any input would be much appreciated.
Paul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您对不是 构建wxwidgets是由于使用
wx_shared = 0
而需要的构建选项所需的静态库,因为您应该在此构建中的输出gcc_lib
子目录,而不是gcc_dll
一个。您需要确保将wxwidgets本身构建为静态库(构建sharone = 0
),或使用wx_shared = 1
,如果您可以使用wx dlls。顺便说一句,绝对没有理由使用4岁的WX 3.1.1,请使用最新的3.1.6。
It looks like you did not build wxWidgets as a static library required by your build options due to the use of
WX_SHARED=0
, as you should have the outputs of this build ingcc_lib
subdirectory and not thegcc_dll
one. You need to either make sure that you build wxWidgets itself as static libraries (usingSHARED=0
when building it) or useWX_SHARED=1
if you're fine with using wx DLLs.BTW, there is absolutely no reason to use 4-year old wx 3.1.1, please use the much more recent 3.1.6.