FTGL编译问题

hitxiaya 2010-11-09 04:02:11
使用freetype2 版本:2.3.4 和FTGL 2.1.3 rc5进行工程编译。IDE是VC2008
freetype2 和 FTGL 已经编译生成静态lib freetype243MT_D.lib 和 ftgl_static_D.lib


编译FTGL_Demo没有问题,毕竟所有的demo都可以执行。
但是自己编写的工程文件,对demo进行简单的移植,编译的时候却如下的错误:(友元和操作符重载的问题)

1>d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(177) : error C2526: “operator *”: C 链接函数无法返回 C++ 类“FTPoint”
1> d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(42) : 参见“FTPoint”的声明
1>d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(190) : error C2733: 不允许重载函数“operator *”的第二个 C 链接
1> d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(189) : 参见“operator *”的声明
1>d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(178) : error C2562: “operator *”: “void”函数返回值
1> d:\visual studio 2008\test\mytest\include\ftgl\ftpoint.h(176) : 参见“operator *”的声明

这是什么问题呢? 我对比了编译选项,没有什么差别啊。
使用了 #include <IOSTREAM> 没有增加using namespace std; 因为增加了之后一堆的问题。
无法使用#include <iostream.h>

好几天了没有弄明白,望高人指点。




...全文
321 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ssmtree 2010-11-17
  • 打赏
  • 举报
回复
给lz顶一个吧!
编译出错很正常的,光给这么个信息,还真是没有好的办法,除非其他人也遇到了同样的问题……
好的建议就是,LZ再重新改一改,一点一点的改,看哪里出错了!把那个错的改掉就ok了……
好运!

8,303

社区成员

发帖
与我相关
我的任务
社区描述
游戏开发相关内容讨论专区
社区管理员
  • 游戏开发
  • 呆呆敲代码的小Y
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧