xcode遇到的2个小问题 Conflicting types、vtable for

简介: xcode遇到的2个小问题 Conflicting types、vtable for

Conflicting types的报错

mac上xcode其实给出的错误信息比较多,而且非常有用,大概报错如下:

Conflicting types for 'glDepthRange':
In file included from xxx.cpp
In file included from xxx.cpp
In file included from xxx.cpp
Expanded from macro 'glDepthRangef'
revious declaration is here
复制代码

我是因为OpenGL的头文件必须在glew.h前声明,所以对头文件的引入顺序有要求

一定要仔细的排查In file included from,排查这个代码里面的include,确保include嵌套也不会出问题,确保里面的顺序。

vtable for xxx

: "vtable for TouchLayer", referenced from:
: A missing vtable usually means the first non-inline virtual member function has no definition.
复制代码

大概意思就是有虚函数没有实现,但是我仔细检查了代码,不存在这个问题,因为我使用的是cmake,所以排查后发现,cpp文件没有加入到工程里面,加入到里面就正常通过编译了。


目录
相关文章
|
1月前
|
iOS开发 Perl
Xcode 10.2.1 Error:library not found for -lstdc++.6.0.9
Xcode 10.2.1 Error:library not found for -lstdc++.6.0.9
24 0
|
1月前
|
iOS开发
Xcode 10.2.1 Error:Multiple commands produce问题及解决方案
Xcode 10.2.1 Error:Multiple commands produce问题及解决方案
30 0
|
1月前
|
iOS开发
Xcode 10遇到的证书问题 is automatically signed, but provisioning profile YYYY has been manually specified
Xcode 10遇到的证书问题 is automatically signed, but provisioning profile YYYY has been manually specified
23 0
|
1月前
|
iOS开发
Xcode 10 Error:Multiple commands produce问题及解决方案
Xcode 10 Error:Multiple commands produce问题及解决方案
25 0
|
8月前
|
iOS开发 芯片 MacOS
[Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture...
[Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture...
209 0
|
IDE 开发工具 数据库
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
STM32bug【 KEILMDK中出现The Project references devices, files or libraries that are not installed】
179 0
Xcode12适配The linked library is missing one or more architectures required by thi
升级到Xcode12后,运行Release模式后,会提示以下信息
176 0
|
iOS开发
XCode出现Could not locate device support files的解决办法
XCode出现Could not locate device support files的解决办法
668 0
|
iOS开发
xcode10 编译报错Multiple commands produce
xcode10 编译报错: Showing Recent Messages :-1: Multiple commands produce '/Users/ios/Library/Developer/Xcode/DerivedData/MyLiveStu...
6370 0
|
iOS开发
Xcode : Cannot use '@try' with Objective-C exceptions disabled
Cannot use '@try' with Objective-C exceptions disabled
3792 0