/home/liyanghao/sdk111/software/v80x/app/vx600_main/../../lib/libmp4v2.a(mp4atom.o):在函数‘mp4v2::impl::MP4Atom::ReadProperties(unsigned int, unsigned int)’中: mp4atom.cpp:(.text+0x11c4):对‘std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()’未定义的引用
时间: 2024-01-30 07:03:46 浏览: 98
这个错误提示是在编译链接阶段出现的,它告诉我们在链接libmp4v2.a库时,找不到对std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()的定义。可能是因为你的代码中使用了这个函数,但是没有包含相应的头文件或者链接了相关的库。
解决这个问题的方法是,检查你的代码中是否包含了正确的头文件,并且确认你的链接选项中是否正确地包含了相关的库文件。如果仍然无法解决问题,可以尝试重新编译库文件或者更新编译工具链版本。
相关问题
/home/liyanghao/sdk111/software/v80x/app/vx600_main/../../lib/libmp4v2.so:对‘std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26’未定义的引用 collect2: 错误: ld 返回 1
这个错误是链接器错误,意味着在链接你的程序时,找不到对应的函数或变量。根据错误信息,是在链接libmp4v2.so库时出现问题,可能是该库依赖的其它库版本不对,或者是编译选项不正确导致的。建议检查编译选项、库依赖关系和版本,以及库文件是否存在等问题。另外,还可以尝试使用-fPIC选项重新编译该库,解决链接问题。
mp4atom.cpp:(.text._ZN5mp4v24impl19MP4Integer8Property8SetValueEhj[_ZN5mp4v24impl19MP4Integer8Property8SetValueEhj]+0x34):对‘std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()’未定义的引用 /home/liyanghao/sdk111/software/v80x/app/vx600_main/../../lib/libmp4v2.a(mp4atom.o):mp4atom.cpp:(.text._ZN5mp4v24impl20MP4Integer24Property8SetValueEjj[_ZN5mp4v24impl20MP4Integer24Property8SetValueEjj]+0x34): 跟着更多未定义的参考到 std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream() collect2: 错误: ld 返回 1
这个错误是由于在编译时缺少对C++标准库的链接所导致的。你需要在Makefile中添加对C++标准库的链接。
可以在Makefile中的链接器选项中添加"-lstdc++"选项来实现。你可以将以下内容添加到Makefile中的链接器选项中:
```
LDFLAGS += -lstdc++
```
这将在链接时自动添加对C++标准库的链接。重新编译应用程序或库,应该就会解决这个问题。
阅读全文
相关推荐













