Tag

GCC

6 posts

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user's freedom.

Code

编译一个gcc 4.8

很多服务器喜欢用Ubuntu的各种LTS,13.04还好,反正随便更新下就完事,偏偏有些没个调的货要我在他的12.04上跑个必须要c++11才支持的东西,所以不得不出手装个gcc 4.8.x

Code

mozjs185 在哪里?

安装某个东西,cmake的时候,报错如下

-- checking for module 'mozjs185'
--   package 'mozjs185' not found
如往常,copy这个module的名字,然后
# yum search mozjs185
结果是Not Found (废话,如果不是not found,还写这个干啥...) 直接杀到网上找结果。

Code

implicit declaration of function ‘xxx’

随手几行测试代码,编译居然报了一排warning,仔细查看,都是类似如下格式的:

Bash
xxx\xx.c||In function 'xxx':|
xxx\xx.c|14|warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]|
xxx\xx.c|14|warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]|

Code

error while loading shared libraries的解决方法

错误提示:

Bash
./prog: error while loading shared libraries: xxx.so.0:
cannot open shared object file: No such file or directory

这个提示的意思是没有找到xxx.so.0这个文件,那么首先应该确定下,本机是否存在这个.so文件?如果存在,那么我们可以作出判断,xxx.so.0这个动态链接库所在的文件夹不在搜寻范围内.