【问题标题】:Issue with compiling Opengl and glut编译 Opengl 和 glut 的问题
【发布时间】:2015-01-06 20:24:01
【问题描述】:

我正在尝试在我的 imac 上编译一个程序,该程序使用 opengl 和 glut 运行神经网络。 我正在使用 mac 框架来编译 opengl 和 glut 但我仍然收到此错误。我有一种感觉,我缺少一些要编译的库。

这是输出:

$ gcc gpu.c -o gpu -lfann -lm -framework OpenGL -framework GLUT
Undefined symbols for architecture x86_64:
  "_copyMaskToTexture", referenced from:
      _main in gpu-cb634f.o
  "_copyVectorToTexture", referenced from:
      _main in gpu-cb634f.o
  "_copyWeightsToTexture", referenced from:
      _main in gpu-cb634f.o
  "_destroyLayer", referenced from:
      _main in gpu-cb634f.o
  "_generateLayer", referenced from:
      _main in gpu-cb634f.o
  "_init", referenced from:
      _main in gpu-cb634f.o
  "_initOpenGL", referenced from:
      _main in gpu-cb634f.o
  "_printLayer", referenced from:
      _main in gpu-cb634f.o
  "_run", referenced from:
      _main in gpu-cb634f.o
     (maybe you meant: _run_time)
  "_setInput", referenced from:
      _main in gpu-cb634f.o
  "_setOutput", referenced from:
      _main in gpu-cb634f.o
  "_test", referenced from:
      _main in gpu-cb634f.o
ld: symbol(s) not found for architecture x86_64

【问题讨论】:

    标签: c opengl glut


    【解决方案1】:

    我认为您没有包含正确的代码或库。

    看起来您的代码与FANN 库相关,但链接页面显示:

    代码仍然是实验性的,不包含在 FANN 库中,但如果用户愿意,可以试用。

    所以,您的 -lfann 将无助于定义这些功能,您需要其他东西。

    【讨论】:

    猜你喜欢
    • 2011-07-18
    • 1970-01-01
    • 2013-08-24
    • 2022-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-19
    • 1970-01-01
    相关资源
    最近更新 更多