1360
- 收藏
- 点赞
- 分享
- 举报
编译链接C++库报错
RM libvsrc.a
AR libvsrc.a
arm-hisiv300-linux-ar: creating libvsrc.a
a - i2c/i2c.o
a - gpio/gpio.o
a - utility/utility.o
a - it6801/it680x.o
a - it6801/edid.o
a - it6801/it680x_cec.o
a - it6801/Remote.o
a - AvVideoSrc.o
G++ main.o
In file included from ./it6801/Mhlrx.h:14:0,
from AvVideoSrcIn.h:8,
from main.cpp:7:
./it6801/config.h:40:35: note: #pragma message: defined _IT6801_
#pragma message("defined _IT6801_")
^
LDFLAGS -static -lpthread -L./
arm-hisiv300-linux-g++ -static -lpthread -L./ -o test_it6801 libvsrc.a main.o
main.o: In function `main':
main.cpp:(.text.startup+0x4): undefined reference to `CAvVideoSrc::instance()'
main.cpp:(.text.startup+0x10): undefined reference to `CAvVideoSrc::Init(AvVideoSrcMode_E)'
main.cpp:(.text.startup+0x18): undefined reference to `CAvVideoSrc::start()'
collect2: error: ld returned 1 exit status
make: *** [test_it6801] Error 1
前面编译已经生产libvsrc.a,为什么后面生产程序已经链接了libvsrc.a还是报错(undefined reference to)?
AR libvsrc.a
arm-hisiv300-linux-ar: creating libvsrc.a
a - i2c/i2c.o
a - gpio/gpio.o
a - utility/utility.o
a - it6801/it680x.o
a - it6801/edid.o
a - it6801/it680x_cec.o
a - it6801/Remote.o
a - AvVideoSrc.o
G++ main.o
In file included from ./it6801/Mhlrx.h:14:0,
from AvVideoSrcIn.h:8,
from main.cpp:7:
./it6801/config.h:40:35: note: #pragma message: defined _IT6801_
#pragma message("defined _IT6801_")
^
LDFLAGS -static -lpthread -L./
arm-hisiv300-linux-g++ -static -lpthread -L./ -o test_it6801 libvsrc.a main.o
main.o: In function `main':
main.cpp:(.text.startup+0x4): undefined reference to `CAvVideoSrc::instance()'
main.cpp:(.text.startup+0x10): undefined reference to `CAvVideoSrc::Init(AvVideoSrcMode_E)'
main.cpp:(.text.startup+0x18): undefined reference to `CAvVideoSrc::start()'
collect2: error: ld returned 1 exit status
make: *** [test_it6801] Error 1
前面编译已经生产libvsrc.a,为什么后面生产程序已经链接了libvsrc.a还是报错(undefined reference to)?
我来回答
回答0个
时间排序
认可量排序

或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片
相关问答
-
2015-01-30 13:49:44
-
2018-03-01 21:21:57
-
2019-12-16 15:06:50
-
22018-08-28 13:14:22
-
32018-08-28 19:59:27
-
62017-01-03 23:53:47
-
2019-12-09 16:24:29
-
2015-06-03 09:54:19
-
2019-06-27 16:04:49
-
2020-05-19 15:00:25
-
2017-08-28 16:03:34
-
2017-05-04 22:25:52
-
2018-11-15 22:00:41
-
2019-05-20 23:41:43
-
2020-04-21 14:08:51
-
2019-06-24 19:27:30
-
2019-07-30 16:10:24
-
2015-06-30 15:56:39
-
2017-08-29 15:41:46
无更多相似问答 去提问

点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认