简体   繁体   English

wxWidgets jpeg库生成问题

[英]wxWidgets jpeg library build issue

I'm trying to build wxWidgets library into a custom path on a Fedora 27 operative system. 我正在尝试将wxWidgets库构建到Fedora 27操作系统上的自定义路径中。

I achieved the wx-config file path recognition and works with the cmake execution. 我实现了wx-config文件路径识别,并可以执行cmake。 Also, I load libraries and include dirs based on modified wxWidgets finder cmake file that sets the wx-config custom path successfully. 另外,我加载库并包含基于修改后的wxWidgets finder cmake文件的目录,该文件成功设置了wx-config自定义路径。

But cmake does not load my wxWidgets configuration. 但是cmake不会加载我的wxWidgets配置。 I mean, wx_gtk2u_jpeg-3.1 builded lib could not be founded (suposed to be /usr/lib/libwx_gtk2u_jpeg-3.1.so ). 我的意思是, wx_gtk2u_jpeg-3.1建立wx_gtk2u_jpeg-3.1库(假定为/usr/lib/libwx_gtk2u_jpeg-3.1.so )。 I need jpeg dependency from wxWidgets for my project. 我的项目需要wxWidgets的jpeg依赖关系。

I'm sure that problem is not about cmake files. 我确定问题不在于cmake文件。 However, the problem is wxWidgets compilation because cmake can found the other builded dependencies into /usr/lib/ 但是,问题是wxWidgets编译,因为cmake可以在/usr/lib/找到其他构建的依赖项。

I actually installed the libjpeg-turbo-devel package that includes the libjpeg.h needed for wxWidgets building without success of libwx_gtk2u_jpeg-3.1.so creation. 我实际上安装了libjpeg-turbo-devel软件包,其中包含wxWidgets构建所需的libjpeg.h ,但没有成功创建libwx_gtk2u_jpeg-3.1.so

The weirdest part is that $ wx-config --libs shows the wx_gtk2u_jpeg-3.1 lib to be linked and the hint paths that it should be founded. 最奇怪的部分是$ wx-config --libs显示了要链接的wx_gtk2u_jpeg-3.1 lib及其应该建立的提示路径。

wxWidgets commands for building: 用于构建的wxWidgets命令:

$ ./configure --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --enable-webviewwebkit=no --prefix=/opt/cpp_dependencies/2018Q1/usr'
$ make -j 4
$ make install

You can check out my cmake files, the cmake output and wxWidgets building output in order to reproducing it: https://gist.github.com/jjalvarezl/b70accae269ef56c56010bedf157c27f 您可以检出我的cmake文件,cmake输出和wxWidgets构建输出以重现它: https : //gist.github.com/jjalvarezl/b70accae269ef56c56010bedf157c27f

You can see line 1543 of wxWidgets building output file that jpeg library is buildin , and, 1564 of same file, the make install command that installs all libwx_<lib_name>.so libraries into final /usr/lib path. 您可以看到wxWidgets构建输出文件的第1543行(其中jpeg库是buildin ,以及1564相同文件的make install命令,它将所有libwx_<lib_name>.so库安装到最终的/usr/lib路径中。 Anyway, no one contains the needed library. 无论如何,没有人包含所需的库。

Please show the exact error message, as it's not clear what the actual problem is. 请显示确切的错误消息,因为尚不清楚实际的问题是什么。 What I can say, is that the different built-in versions of 3rd party libraries, such as libjpeg, are always static libraries, even when wxWidgets themselves are shared. 我可以说的是,即使共享wxWidgets本身,第三方库的不同内置版本(例如libjpeg)也始终是静态库。 Ie you're never going to have libwx_gtk2u_jpeg-3.1.so , only .a . 即你永远不会有libwx_gtk2u_jpeg-3.1.so ,只.a

I'd also strongly recommend using system versions of the 3rd party libraries under Unix systems. 我也强烈建议在Unix系统下使用第三方库的系统版本。 This means that your wxWidgets applications will get security updates from your OS vendor and you don't risk running into any incompatibilities due to using 2 different versions of the same library in your application. 这意味着您的wxWidgets应用程序将从您的操作系统供应商处获得安全更新,并且您不会冒因在应用程序中使用同一库的2个不同版本而遇到任何不兼容性的风险。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM