我用VC++6编译C程序,各模块都没出现问题,但在创建exe文件的连接时出现问题,本人C++不好,不知道问题出在什么地方,请教各位老师指点
解决方案 »
- 子对话框消息事件处理没反应????????
- 怎么自己画按钮啊?
- MFC写的程序能在自己机器上运行,但别的机器上没反应
- 如果短时间内频繁调用StretchDIBits会出现什么问题?
- vc
- 从文件读出的字符串 后面有个乱码
- 关于《视频处理程序》的讨论
- 我用VC6.0编了一个程序,现在要发布,用什么工具制作安装程序比较好?大家推荐一下。
- 请问网上有没有关于UI线程比较好的例子?如果有的话,发一个网址给我,在线等待,谢了!
- sos!!如何将写在屏幕上的东西抹掉!!
- 利用msxml4.dll做出来的东西 在vista下不行了 ...
- 100 下载了html 文件如何通过IHTMLDocument2 获取指定内容??
链接时出现的错误你可以COPY出来给我们看看撒!
extern "C" {
#include "xxx.h"
}
…………….
extern char *optarg;
extern int optind;
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
…………….
gzip.c主函数对几个参数和函数的应用:
……………..
#include "getopt.h"
…………….
file_count = argc - optind;
while ((optc = getopt_long (argc, argv, "ab:cdfhH?lLmMnNqrS:tvVZ123456789",
longopts, (int *)0)) != EOF) {
switch (optc) {
case 'a':
ascii = 1; break;
case 'b':
maxbits = atoi(optarg);
break;
……………..调试产生的连接错误:
--------------------Configuration: gzip - Win32 Debug--------------------
Linking...
gzip.obj : error LNK2001: unresolved external symbol _optind
gzip.obj : error LNK2001: unresolved external symbol _optarg
gzip.obj : error LNK2001: unresolved external symbol _getopt_long
Debug/gzip.exe : fatal error LNK1120: 3 unresolved externals
执行 link.exe 时出错.gzip.exe - 1 error(s), 0 warning(s)但从来都没申明和应用_optind、_optarg、_getopt_long(注意前面加了下横线)