小编abi*_*alg的帖子

如何删除Qt库以删除我的应用程序未使用的内容?

我正在发布一个独立的Linux应用程序,其中编译了Qt库.

我的应用程序是否有这将扫描我的源代码,看看哪个类/方法我的应用程序使用,那么它会掐了不必要的/没有用过的东西出了Qt源代码和编译的Qt工具库量身定做没有任何额外的膨胀?当然,这是最好的情况.但是,现有的最接近的解决方案是什么让我能够使用尽可能简化的qt库编译我的Linux独立应用程序

c++ linux qt static-libraries static-linking

3
推荐指数
1
解决办法
1502
查看次数

printf字节到十六进制字符串奇怪输出

以下简单代码产生奇怪的输出:

#include <stdio.h>
#include <string.h>
#include "/tmp/sha.h"
#define DIGEST 64

//taken from coreutils 8.5 - produces 64-byte sha digest and puts it into resblock
extern int sha512_stream(FILE *stream, void *resblock);

int main(int argc, char** argv) {

char sha[DIGEST];
memset(sha, 0, DIGEST);
FILE *stream;
stream = fopen("/bin/less", "r");
sha512_stream(stream, (void *) sha);
fclose(stream);

char buf[2] = {10, 32};
printf("%02x\n", sha[0]);
printf("%02x\n", buf[0]);

return 0;}
Run Code Online (Sandbox Code Playgroud)

给出输出:
ffffffa9
0a

sha的第一个字节是A9,但填充F来自何处?

在Ubuntu Linux 10.10上使用gcc 4.4.5.

printf hex

2
推荐指数
1
解决办法
4303
查看次数

标签 统计

c++ ×1

hex ×1

linux ×1

printf ×1

qt ×1

static-libraries ×1

static-linking ×1