首页 \ 问答 \ Xcode:“没有这样的模块”嵌入式框架(Xcode: “No such module” embedded framework)

Xcode:“没有这样的模块”嵌入式框架(Xcode: “No such module” embedded framework)

我目前在我的项目中有3个嵌入式框架:

  • PersistenceLayer (仅限Swift)
  • TransportLayer (仅限Swift)
  • Socket (Objc)

PersistenceLayerSocket都不引用它们之外的任何东西。 但是TransportLayer导入PersistenceLayerSocket 。 奇怪的是,我可以在导入后使用 PersistenceLayer对象:

import PersistenceLayer

struct User : Model {
  ...
}

ModelPersistenceLayer定义,Xcode允许我按正常使用它。 但是,当我尝试构建TransportLayer ,我得到错误: No such Modul 'Persistencelayer' 。 所以Xcode识别模块在那里,但在构建时以某种方式“丢失”它。

令人抓狂的是,这曾经起作用。 在某些时候,一些事情发生了变化,我无法弄清楚是什么。 重要的是要注意我在一个有多个开发人员的项目上工作,并且我已经merged了更改。 但是,在合并之前切换到提交不起作用。 我也尝试过:

  • $(SRCROOT) (递归)添加到框架搜索路径
  • ModuleCache目录中删除所有内容
  • 清洁项目
  • 清理构建文件夹

我怀疑在我的项目设置中发生了一些变化,但我无法弄清楚是什么,我检查了git差异并没有帮助(除了正常的文件添加之外,项目中没有任何真正改变的东西。

此外, TransportLayer成功导入并使用Socket 。 如果我删除对PersistenceLayer的引用但保留对Socket所有引用,我可以构建TransportLayer。

有谁知道为什么会发生这种情况或如何解决它?

更新

好的,所以我从目标中删除了“违规”文件,以确保Socket正在工作(它是),然后将文件重新添加到目标(完全通过重置git)。 它现在建立...因为这是有道理的。 但我尝试将方案从iOS Device更改为模拟器,它不再构建,但我得到了不同的错误:

  • 在module.modulemap中:未找到Header PersistenceLayer-Swift.h
  • 另外: Could not build Objective-C module 'Persistence Layer'

这感觉就像我在追逐随机错误......


I currently have 3 Embedded Frameworks in my project:

  • PersistenceLayer (Swift only)
  • TransportLayer (Swift Only)
  • Socket (Objc)

Both PersistenceLayer and Socket don't reference anything outside themselves. However TransportLayer imports PersistenceLayer and Socket. Oddly, I can use PersistenceLayer objects after importing:

import PersistenceLayer

struct User : Model {
  ...
}

Model is defined in PersistenceLayer and Xcode lets me use it per normal. However, when I try to build TransportLayer, I get the error: No such Modul 'Persistencelayer'. So Xcode recognizes the module is there, but somehow "looses" it when it builds.

What's maddening is that this used to work. At some point something changed and I can't figure out what. It's important to note that I work on a project with multiple developers and I have merged in changes. However switching to a commit prior to the merge didn't work. I've also tried:

  • Adding $(SRCROOT) (recursive) to Framework Search Paths
  • Deleting everything out of ModuleCache directory
  • Clean project
  • Clean Build Folder

I suspect that something changed in my project settings but I can't figure out what and I've checked the git diffs didn't help (there nothing that really changed in the project aside from the normal file additions.

Also, TransportLayer does successfully import and use Socket. I can build the TransportLayer if I remove references to PersistenceLayer but keep all the references to Socket.

Does anyone know why this might be occurring or how to fix it?

Update

Ok, so I removed the "offending" files from the target to make sure Socket was working (it is) and then re-added the files to the target (quite literally by resetting git). It now builds... cause that makes sense. But I tried changing the Scheme from iOS Device to a simulator and it no longer builds, but I'm getting different errors:

  • in module.modulemap: HeaderPersistenceLayer-Swift.h' not found`
  • Also: Could not build Objective-C module 'Persistence Layer'

This feels like I'm chasing down random errors...


原文:https://stackoverflow.com/questions/31435891
更新时间:2023-06-18 11:06

最满意答案

从OpenCL 1.2规范中,6.12.14.4:

对于未在上述说明中指定的image_channel_data_type值或不在范围内的(x,y)坐标值(0 ...图像宽度-1,0 ...)创建的图像对象的write_imagef,write_imagei和write_imageui行为图像高度-1)分别是未定义的。

没有写入限制,而是留给用户内核代码来确保坐标有效。


From the OpenCL 1.2 specs, 6.12.14.4:

The behavior of write_imagef, write_imagei and write_imageui for image objects created with image_channel_data_type values not specified in the description above or with (x, y) coordinate values that are not in the range (0 ... image width – 1, 0 ... image height – 1), respectively, is undefined.

There is no write clamping, and it's left to the user kernel code to ensure coordinates are valid.

相关问答

更多
  • 你编写函数的方式,它没有做任何事情。 你只是分配指针。 你需要这个: void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } 据我所知,不允许使用参考参数。 The way you have written the function, it is not doing anything. You are just assigning the pointers around. You need to have t ...
  • 我认为使用开放寻址的简单哈希表实现可以满足您的要求: 就其本质而言,它存储在单个缓冲区中,因此很容易转移到内核。 然后在内核中编写getter逻辑很容易,尤其是当您不需要任何同步(只读)时。 所以,传递一个long2的缓冲区或一个struct { long key; int val; }的缓冲区struct { long key; int val; } struct { long key; int val; } 当第一项是键而第二项是值时,也传递缓冲区大小; 现在写一个常规的开放地址getter。 I th ...
  • 你的应用程序找不到clReleaseDevice的原因是你的应用程序写了OpenCL 1.2头文件,但你的机器上只有一个OpenCL 1.1运行时。 您无法在OpenCL 1.1运行时调用OpenCL 1.2 API。 我建议使用OpenCL 1.1头文件,除非您只在OpenCL 1.2设备上运行。 它将保持您的代码在OpenCL 1.1平台和设备上运行的安全。 The reason why your application can't find clReleaseDevice is because you ...
  • 从OpenCL 1.2规范中,6.12.14.4: 对于未在上述说明中指定的image_channel_data_type值或不在范围内的(x,y)坐标值(0 ...图像宽度-1,0 ...)创建的图像对象的write_imagef,write_imagei和write_imageui行为图像高度-1)分别是未定义的。 没有写入限制,而是留给用户内核代码来确保坐标有效。 From the OpenCL 1.2 specs, 6.12.14.4: The behavior of write_imagef, w ...
  • 实际上,OpenACC很像OpenMP,但目标是加速设备,如GPU。 OpenACCs #pragma acc kernels不是将OpenMP #pragma parallel for并行化多线程CPU的循环,而是将包含的循环转换为在GPU上执行的内核函数。 现在手动完成的大部分工作(例如,将数据从设备传输到设备)都被编译器隐藏。 因此,您没有两个单独的编译单元。 现在这里是OpenACC的问题,我现在采用的答案非常低:没有GCC或Clang的支持。 当然有PGI和CAPS的商业解决方案,但如果没有这些其 ...
  • 你是对的。 OpenCL代码不能使用DLL代码,也无法进行操作系统调用。 OpenCL适用于在锁定步骤中通过独立算法运行数百或数千个线程。 Yes you are right. OpenCL code cannot use DLL code and cannot make operating system calls. OpenCL is good for running hundreds or thousands of threads through a stand-alone algorithm in ...
  • 所以,因为我需要一组函数来处理OpenCL中的复数,我最终实现了一组函数。 具体而言,我需要总和和减法(平凡,可以用标准向量操作完成),乘法,除法,得到复数模,参数(或角度)和平方根。 相关维基百科文章: http://en.wikipedia.org/wiki/Complex_number#Absolute_value_and_argument http://en.wikipedia.org/wiki/Square_root#Principal_square_root_of_a_complex_numbe ...
  • 不幸的是,OpenCL规范中没有方法允许您在缓冲区数据的步幅不等于图像宽度时直接从缓冲区创建图像。 最有效的解决方案可能是编写自己的内核来执行此操作。 不涉及编写自己的内核的最简单的解决方案是使用clEnqueueCopyBufferToImage一次复制一行。 如果你的图像足够大,那么这种技术的性能可能与手写内核相当,但是你必须尝试一下才能看到它。 我在原始答案中没有包含clEnqueueCopyBufferRect方法,因为我的第一个本能是额外的副本会破坏性能。 然而,上面的评论让我进一步思考它,我有兴 ...
  • 本机C ++“内核”本质上只是您希望在命令队列中执行以保留命令顺序的函数。 AFAIK在GPU上不支持它们。 如果要跨所有设备执行C ++函数,则应考虑使用cl_event回调(当status == CL_COMPLETE时)。 假设您有一个要从设备读取的缓冲区对象并传递给您的C ++函数。 你也想传递一些整数值(我使用C ++ OpenCL包装器): // First of all, we should define a struct which describes our arguments list. ...
  • write_imageui和read_imageui可以由具有相同参数的多个线程调用,没有问题。 它们在OpenCL中作为任何其他赋值操作数运行。 例如: __private float b = tanh[(global int *)a[2]]; //like read_image, reads from a global memory (global int *)a[2] = b; //like write image, writes lo a global memory 注意: 我使用了[2],注意多 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)