Skip to content

编译错误:xxx未定义的引用 #8

@ghost

Description

这是添加了#include<assert.h>并且注释了代码中含有isnan的语句,然后编译的时候报错如下:

[ 98%] Linking CXX executable task7_texturing
../../texturing/libtexturing.a(texture_atlas.cpp.o):在函数‘TextureAtlas::TextureAtlas(unsigned int)’中:
texture_atlas.cpp:(.text+0x27a): 警告: the use of tmpnam' is dangerous, better use mkstemp'
../../texturing/libtexturing.a(generate_texture_views.cpp.o):在函数‘tex::from_nvm_scene(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<TextureView, std::allocator >)’中:
generate_texture_views.cpp:(.text+0x18fc):对‘core::load_nvm_bundle(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<core::NVMCameraInfo, std::allocatorcore::NVMCameraInfo >
)’未定义的引用
../../texturing/libtexturing.a(generate_texture_views.cpp.o):在函数‘core::Scene::create(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’中:
generate_texture_views.cpp:(.text._ZN4core5Scene6createERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN4core5Scene6createERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x6e):对‘core::Scene::load_scene(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’未定义的引用
collect2: error: ld returned 1 exit status
examples/task7/CMakeFiles/task7_texturing.dir/build.make:132: recipe for target 'examples/task7/task7_texturing' failed
make[2]: *** [examples/task7/task7_texturing] Error 1
CMakeFiles/Makefile2:1247: recipe for target 'examples/task7/CMakeFiles/task7_texturing.dir/all' failed
make[1]: *** [examples/task7/CMakeFiles/task7_texturing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions