All Questions
Tagged with objective-c c++
2,184
questions
0
votes
0
answers
40
views
CMake sets “Generate Debug Symbols” - a Xcode build setting to wrong value
I’m trying to generate Xcode project file of some libraries with CMake.
I want to generate dSYM file in all build config type.
I set values in all my CMakelists.txt as below:
set(CMAKE_CXX_FLAGS &...
0
votes
0
answers
71
views
Undeclared identifier 'nullptr' and Obj-C error while using Obj-C library in Swift
No prior knowledge for using external library in Swift.
I was trying to include sf-proj-ios in my empty project named "Test". I followed instruction on the library GitHub, used commands on ...
0
votes
1
answer
119
views
Integrating OpenCV in a native macOS app leads to Linker Errors
I have tried integrating OpenCV in a native macOS app with Swift and it results in bunch of linker errors. I have an M1 Mac and below are the two ways in which I have tried.
First Way:
First I did ...
1
vote
1
answer
49
views
Error building C++ code on MacOS using CMake. Error with Cocoa and Foundations
I am trying to build a cross platform application on MacOS which is written in C++. In my CMake I've included
cmake_minimum_required(VERSION 3.28)
project(lel LANGUAGES C CXX)
if(APPLE)
...
1
vote
1
answer
28
views
NSThread initWithTarget:selector:object:]: target does not implement selector ((null))'
I try to implement a custom Cocoa main loop for my app using metal-cpp (the source code is also available here) wrapper.
The first step is to write a something like:
[NSThread detachNewThreadSelector:@...
0
votes
1
answer
50
views
Implement a Custom Protocol on Mac for a Cocoa / Qt Application
We want to be able to call our application from a browser link (as i.e. MS teams does when you open a link to a teams meeting).
The principle is quite simple and exists since quite a while. Under ...
2
votes
0
answers
95
views
Incorrect Value Returned by kAudioDevicePropertyDeviceIsRunningSomewhere for External Devices like AirPods
I'm experiencing an issue where kAudioDevicePropertyDeviceIsRunningSomewhere is not returning the expected values for wireless audio devices such as AirPods. The expected behavior is to return 1 when ...
0
votes
2
answers
140
views
Coordinating the padding of structs in C++ and Objective-C
I’m using Objective-C and Metal to render to a window, however all of my application code is written in C++. So all of the CPU manipulation of data inside MTLBuffer is done in C++. This is done by ...
0
votes
1
answer
76
views
How can I store automatic reference counted Swift/Objective-C objects in a C++ map without causing memory leaks when they are deleted from the map?
I have a C++ map which manages loaded regions. Each region has an associated MTLBuffer for the geometry generated after the region data is converted into a mesh. The idea is to store a reference to ...
3
votes
2
answers
207
views
How to convert a `id<MTLCommandQueue>` to a `MTL::CommandQueue` of Metal-Cpp?
The situation: I'm developing an iOS Metal App in Objective-C. I need to use a 3rd-party library VkFFT that provides Metal FFTs based on Metal-Cpp.
What I need: pass a id<MTLCommandQueue> ...
0
votes
1
answer
74
views
Universal links in iOS with C++ and SDL
I was tasked with adding support for universal links into our iOS app written in C++ with an additional complication that the app uses SDL 2 for wrapping iOS specific code (like the AppDelegate).
From ...
1
vote
2
answers
105
views
How can I fix drawing overlapping 2D objects in Metal (stencil, clipping)?
I am currently making a simple 2D rendering application using Apple Metal 3 in C++. I want to draw overlapping 2D objects using stencil test, but it does not work.
A constructor for the Renderer class....
0
votes
1
answer
840
views
Mix C++ and Objective-C code using CMake and get C++ executable
The Idea
I'm trying to implement a game engine in C++.
I'm using macOS for development (arm-64 architecture). I want to create a window using Foundation framework.
CMakeLists.txt utilizes C++ and ...
1
vote
0
answers
31
views
Interfacing with C++ code in XCode (Swift) Project causing Linker error [duplicate]
I have a swift project and I am trying to call C++ libraries from it. I have several .h files that I have included in project (added them in Project > Build Settings > Header Search Paths). Then ...
1
vote
1
answer
127
views
Using C++ in Objective-C [duplicate]
I'm trying to use C++ with Objective-C. My tasks force me to use C++ only for crossplatform core. Goal is to reuse core on different platforms and rewrite only graphics interface. I know Objective-C ...