满意答案
bltdj
2017.08.16
采纳率:46% 等级:8
已帮助:310人
你不如自己写一个bin2c的代码,然后编译运行。
给你一个做参考。#include
#include
#include
#include "g_def.h"
#define OUT_BYTES_PER_LINE16
#define MAX_ARRAY_NAME_LEN20
typedef struct bin2c
{
char *in_name,
*out_name,
*array_name;
BOOL out_alloc;
char *out_buffer;
int out_buffer_size;
FILE *in_fp,
*out_fp;
int file_size;
}BIN2C_S, *BIN2C;
static inline void print_usage(void)
{
printf("Usage @gtool: bin2c.x in_file out_file [array_name]\n");
printf("convert bin file to c array\n");
printf("Arguments:\n");
printf("\tin_file:\tthe file name of input file\n");
printf("\tout_file:\toutput filename\n");
printf("\tarray_name:\toptional. if no array name set, will only convert data but not set array\n");
}
static inline BIN2C destroy_bin2c(BIN2C inst)
{