我正在尝试构建频率组件,但我遇到了错误。
我编辑了CMakeCache.txt以填写所需库的路径,我希望不会有更多障碍来构建软件。
但是,这是make的输出:
sdr@sdr:/home/sdr/frequensea/build$ make
Scanning dependencies of target lua
[ 2%] Linking C static library liblua.a
[ 75%] Built target lua
Scanning dependencies of target frequensea
[ 77%] Building CXX object CMakeFiles/frequensea.dir/src/main.cpp.o
[ 79%] Building C object CMakeFiles/frequensea.dir/src/nfile.c.o
[ 81%] Building C object CMakeFiles/frequensea.dir/src/ngl.c.o
[ 83%] Building C object CMakeFiles/frequensea.dir/src/nim.c.o
[ 85%] Building C object CMakeFiles/frequensea.dir/src/noise.c.o
[ 87%] Building C object CMakeFiles/frequensea.dir/src/nosc.c.o
[ 89%] Building C object CMakeFiles/frequensea.dir/src/nrf.c.o
[ 91%] Building C object CMakeFiles/frequensea.dir/src/nut.c.o
[ 93%] Building C object CMakeFiles/frequensea.dir/src/nwm.c.o
[ 95%] Building C object CMakeFiles/frequensea.dir/src/obj.c.o
[ 97%] Building C object CMakeFiles/frequensea.dir/src/vec.c.o
[100%] Linking CXX executable frequensea
externals/lua/liblua.a(loslib.c.o): In function `os_tmpname':
/home/sdr/sdr/frequensea/externals/lua/src/loslib.c:140: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_check_compile_error':
/home/sdr/frequensea/src/ngl.c:80: undefined reference to `__glewGetShaderiv'
/home/sdr/frequensea/src/ngl.c:83: undefined reference to `__glewGetShaderInfoLog'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_check_link_error':
/home/sdr/frequensea/src/ngl.c:92: undefined reference to `__glewGetProgramiv'
/home/sdr/frequensea/src/ngl.c:95: undefined reference to `__glewGetProgramInfoLog'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_shader_new':
/home/sdr/frequensea/src/ngl.c:102: undefined reference to `__glewCreateShader'
/home/sdr/frequensea/src/ngl.c:103: undefined reference to `__glewShaderSource'
/home/sdr/frequensea/src/ngl.c:104: undefined reference to `__glewCompileShader'
/home/sdr/frequensea/src/ngl.c:108: undefined reference to `__glewCreateShader'
/home/sdr/frequensea/src/ngl.c:109: undefined reference to `__glewShaderSource'
/home/sdr/frequensea/src/ngl.c:110: undefined reference to `__glewCompileShader'
/home/sdr/frequensea/src/ngl.c:114: undefined reference to `__glewCreateProgram'
/home/sdr/frequensea/src/ngl.c:115: undefined reference to `__glewAttachShader'
/home/sdr/frequensea/src/ngl.c:116: undefined reference to `__glewAttachShader'
/home/sdr/frequensea/src/ngl.c:119: undefined reference to `__glewTransformFeedbackVaryings'
/home/sdr/frequensea/src/ngl.c:120: undefined reference to `__glewLinkProgram'
/home/sdr/frequensea/src/ngl.c:129: undefined reference to `__glewGetUniformLocation'
/home/sdr/frequensea/src/ngl.c:130: undefined reference to `__glewGetUniformLocation'
/home/sdr/frequensea/src/ngl.c:131: undefined reference to `__glewGetUniformLocation'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_shader_uniform_set_float':
/home/sdr/frequensea/src/ngl.c:146: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:147: undefined reference to `__glewGetUniformLocation'
/home/sdr/frequensea/src/ngl.c:149: undefined reference to `__glewUniform1f'
/home/sdr/frequensea/src/ngl.c:151: undefined reference to `__glewUseProgram'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_shader_free':
/home/sdr/frequensea/src/ngl.c:155: undefined reference to `__glewDeleteShader'
/home/sdr/frequensea/src/ngl.c:156: undefined reference to `__glewDeleteShader'
/home/sdr/frequensea/src/ngl.c:157: undefined reference to `__glewDeleteProgram'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_texture_new':
/home/sdr/frequensea/src/ngl.c:170: undefined reference to `__glewActiveTexture'
/home/sdr/frequensea/src/ngl.c:179: undefined reference to `__glewGetUniformLocation'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_texture_update':
/home/sdr/frequensea/src/ngl.c:219: undefined reference to `__glewActiveTexture'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_model_new':
/home/sdr/frequensea/src/ngl.c:258: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:259: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:260: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:267: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:268: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:269: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:276: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:277: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:278: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:284: undefined reference to `__glewGenVertexArrays'
/home/sdr/frequensea/src/ngl.c:285: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:288: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:289: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:290: undefined reference to `__glewVertexAttribPointer'
/home/sdr/frequensea/src/ngl.c:295: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:296: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:297: undefined reference to `__glewVertexAttribPointer'
/home/sdr/frequensea/src/ngl.c:302: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:303: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:304: undefined reference to `__glewVertexAttribPointer'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_model_load_obj':
/home/sdr/frequensea/src/ngl.c:467: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:468: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:469: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:472: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:473: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:474: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:479: undefined reference to `__glewGenVertexArrays'
/home/sdr/frequensea/src/ngl.c:480: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:481: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:482: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:483: undefined reference to `__glewVertexAttribPointer'
/home/sdr/frequensea/src/ngl.c:484: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:485: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:486: undefined reference to `__glewVertexAttribPointer'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_model_free':
/home/sdr/frequensea/src/ngl.c:498: undefined reference to `__glewDeleteBuffers'
/home/sdr/frequensea/src/ngl.c:499: undefined reference to `__glewDeleteBuffers'
/home/sdr/frequensea/src/ngl.c:500: undefined reference to `__glewDeleteBuffers'
/home/sdr/frequensea/src/ngl.c:501: undefined reference to `__glewDeleteVertexArrays'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_skybox_new':
/home/sdr/frequensea/src/ngl.c:620: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:621: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:622: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:624: undefined reference to `__glewGenVertexArrays'
/home/sdr/frequensea/src/ngl.c:625: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:626: undefined reference to `__glewEnableVertexAttribArray'
/home/sdr/frequensea/src/ngl.c:627: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:628: undefined reference to `__glewVertexAttribPointer'
/home/sdr/frequensea/src/ngl.c:630: undefined reference to `__glewActiveTexture'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_skybox_draw':
/home/sdr/frequensea/src/ngl.c:652: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:654: undefined reference to `__glewUniformMatrix4fv'
/home/sdr/frequensea/src/ngl.c:656: undefined reference to `__glewUniformMatrix4fv'
/home/sdr/frequensea/src/ngl.c:658: undefined reference to `__glewActiveTexture'
/home/sdr/frequensea/src/ngl.c:662: undefined reference to `__glewBindVertexArray'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_skybox_free':
/home/sdr/frequensea/src/ngl.c:671: undefined reference to `__glewDeleteBuffers'
/home/sdr/frequensea/src/ngl.c:672: undefined reference to `__glewDeleteVertexArrays'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `_ngl_draw_model':
/home/sdr/frequensea/src/ngl.c:689: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:691: undefined reference to `__glewUniform1f'
/home/sdr/frequensea/src/ngl.c:693: undefined reference to `__glewUniformMatrix4fv'
/home/sdr/frequensea/src/ngl.c:695: undefined reference to `__glewUniformMatrix4fv'
/home/sdr/frequensea/src/ngl.c:698: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:701: undefined reference to `__glewBeginTransformFeedback'
/home/sdr/frequensea/src/ngl.c:707: undefined reference to `__glewEndTransformFeedback'
/home/sdr/frequensea/src/ngl.c:711: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:713: undefined reference to `__glewUseProgram'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_capture_model':
/home/sdr/frequensea/src/ngl.c:723: undefined reference to `__glewGenTransformFeedbacks'
/home/sdr/frequensea/src/ngl.c:726: undefined reference to `__glewGenBuffers'
/home/sdr/frequensea/src/ngl.c:728: undefined reference to `__glewBindTransformFeedback'
/home/sdr/frequensea/src/ngl.c:730: undefined reference to `__glewBindBuffer'
/home/sdr/frequensea/src/ngl.c:733: undefined reference to `__glewBufferData'
/home/sdr/frequensea/src/ngl.c:735: undefined reference to `__glewBindBufferBase'
/home/sdr/frequensea/src/ngl.c:743: undefined reference to `__glewGetBufferSubData'
/home/sdr/frequensea/src/ngl.c:748: undefined reference to `__glewDeleteBuffers'
/home/sdr/frequensea/src/ngl.c:750: undefined reference to `__glewDeleteTransformFeedbacks'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_font_new':
/home/sdr/frequensea/src/ngl.c:805: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:807: undefined reference to `__glewGetUniformLocation'
/home/sdr/frequensea/src/ngl.c:809: undefined reference to `__glewGetUniformLocation'
/home/sdr/frequensea/src/ngl.c:811: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:834: undefined reference to `__glewActiveTexture'
CMakeFiles/frequensea.dir/src/ngl.c.o: In function `ngl_font_draw':
/home/sdr/frequensea/src/ngl.c:903: undefined reference to `__glewUseProgram'
/home/sdr/frequensea/src/ngl.c:905: undefined reference to `__glewUniform2f'
/home/sdr/frequensea/src/ngl.c:907: undefined reference to `__glewUniform1f'
/home/sdr/frequensea/src/ngl.c:909: undefined reference to `__glewActiveTexture'
/home/sdr/frequensea/src/ngl.c:913: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:918: undefined reference to `__glewBindVertexArray'
/home/sdr/frequensea/src/ngl.c:920: undefined reference to `__glewUseProgram'
collect2: error: ld returned 1 exit status
CMakeFiles/frequensea.dir/build.make:365: recipe for target 'frequensea' failed
make[2]: *** [frequensea] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/frequensea.dir/all' failed
make[1]: *** [CMakeFiles/frequensea.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2