Post

Replies

Boosts

Views

Activity

Reply to Add a C++ function that can be used by multiple XCTest files in Xcode
This works. There is a question at the end. I added a Utilities.hpp file in my XCTest folder, "TestsOrangeSpider" (separate from my project code.) #ifndef Utilities_hpp #define Utilities_hpp #import <XCTest/XCTest.h> void testGLMVEC3(const glm::vec3& actual, const glm::vec3& expected); #endif In the same folder I have a Utilities.cpp file. #include "Utilities.cpp" void testGLMVEC3(const glm::vec3& actual, const glm::vec3& expected) { XCTAssertEqualWithAccuracy(actual.x, expected.x, 0.00001f);... } In one of my test files I import the .cpp file. In all other test files I import the .hpp file. Importing the .cpp file in all test files doesn't work. Importing the .hpp file in all test files doesn't work. It has to be one file imports the .cpp and all other files import the .hpp. Why is there this odd combination requirement? Thanks : )
Oct ’25
Reply to Add a C++ function that can be used by multiple XCTest files in Xcode
This works. There is a question at the end. I added a Utilities.hpp file in my XCTest folder, "TestsOrangeSpider" (separate from my project code.) #ifndef Utilities_hpp #define Utilities_hpp #import <XCTest/XCTest.h> void testGLMVEC3(const glm::vec3& actual, const glm::vec3& expected); #endif In the same folder I have a Utilities.cpp file. #include "Utilities.cpp" void testGLMVEC3(const glm::vec3& actual, const glm::vec3& expected) { XCTAssertEqualWithAccuracy(actual.x, expected.x, 0.00001f);... } In one of my test files I import the .cpp file. In all other test files I import the .hpp file. Importing the .cpp file in all test files doesn't work. Importing the .hpp file in all test files doesn't work. It has to be one file imports the .cpp and all other files import the .hpp. Why is there this odd combination requirement? Thanks : )
Replies
Boosts
Views
Activity
Oct ’25
Reply to Xcode opens window twice, unless I restart Xcode.
In order for Vulkan to create only 1 window instead of 2, I added a sleep_for method as the first line in my main method. This is a work around. I'm not sure why it works. (I didn't come up with it myself.) int main() { std::this_thread::sleep_for(std::chrono::milliseconds(1000)); ... }
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode Vulkan is opening two windows instead of one.
In order for Vulkan to only create 1 window instead of 2, I added a sleep_for method as the first line in my main method. This is a work around. I'm not sure why it works. (I didn't come up with it myself.) int main() { std::this_thread::sleep_for(std::chrono::milliseconds(1000)); ... }
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode Vulkan is opening two windows instead of one.
I have made a new post which only references Xcode. It turns out, I get two windows opening every time I run, except if I restart Xcode. So, that's why I created a new post under Xcode. I'm okay with this post being deleted, since I have that new post.
Replies
Boosts
Views
Activity
Jun ’25