Undefined symbols for architecture x86_64:“_glutInit”, referenced from:_main in main.o / Netbeans on
来源:互联网 发布:js是面向对象的吗 编辑:程序博客网 时间:2024/06/04 18:08
转载自:http://stackoverflow.com/questions/5925697/undefined-symbols-for-architecture-x86-64-glutinit-referenced-from-main-in
Question:
I´m a beginner with OpenGL and "my" first program is this Sierpinski Gasket.
I´m using Netbeans on my MacBook Pro and I believe that
I have the libraries installed but maybe they are not linked correctly.
Here are the compilation errors:
Undefined symbols for architecture x86_64:"_glutInit", referenced from: _main in main.o"_glutInitDisplayMode", referenced from: _main in main.o"_glutInitWindowSize", referenced from: _main in main.o"_glutInitWindowPosition", referenced from: _main in main.o"_glutCreateWindow", referenced from: _main in main.o"_glutDisplayFunc", referenced from: _main in main.o"_glutMainLoop", referenced from: _main in main.old: symbol(s) not found for architecture x86_64collect2: ld returned 1 exit statusmake[2]: * [dist/Debug/GNU-MacOSX/sierpinski] Error 1make[1]: * [.build-conf] Error 2make: * [.build-impl] Error 2
Answer:
You need to link the GLUT framework.InProject Properties > Linker > Command Line > Aditional Options, specify
-framework GLUT
- Undefined symbols for architecture x86_64:“_glutInit”, referenced from:_main in main.o / Netbeans on
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_MAMapServices", referenced from: o
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_JSContext", referenced from: ...........
- Undefined symbols for architecture x86_64: "_sqlite3_close", referenced from:
- Undefined symbols for architecture x86_64: "_SDL_main", referenced from:报错
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_WKWebView", referenced from: objc-
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_JSContext", referenced from: ...........
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_LMZArrayDataSource", referenced from:
- Undefined symbols for architecture x86_64:"xxxxxx", referenced from:
- Undefined symbols for architecture x86_64: "_res_9_setservers", referenced from: _setup_dns_
- iOS Dev (18) Undefined symbols for architecture xxx: "_main", referenced from ...
- QtCreator 提示错误:Undefined symbols for architecture x86_64: "vtable for XXX", referenced from
- 使用支付宝集成支付报错 Undefined symbols for architecture x86_64: "_BIO_ctrl", referenced from: _rsa_si
- Undefined symbols for architecture x86_64:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_EditRecordViewController", referenced fr
- Undefined symbols for architecture x86_64:
- Undefined symbols for architecture x86_64
- X 框架, X图形加速相关文章
- 白话并发冲突与线程同步(1)
- 使用 IBM 性能分析工具解决生产环境中的性能问题
- MySQL ODBC 连接数据库option的含义
- <内核类库>Table
- Undefined symbols for architecture x86_64:“_glutInit”, referenced from:_main in main.o / Netbeans on
- (android控件)ViewPager介绍和使用说明
- 女性面部除皱要多少钱呢
- UITableView 基本使用方法总结
- hibernate中更新数据库的各种方法
- 丰下巴怎么做安全最有效
- svn在linux和window下安装
- C#中WebClient中文乱码的解决办法
- c++面向对象编程必备“良方”