Answer by trojanfoe for how can i tell which dylibs are loaded when debugging...
From the debugger console, when the app is paused, you can use:image listFrom the command line you can use:$ otool -L /path/to/executable
View ArticleAnswer by trojanfoe for Xcode 5 how to Linking Dynamic Libraries from App Bundle
Content/Libraries is not a standard directory within an app bundle; use Contents/Frameworks instead (.dylibs are allowed in that directory just the same as .frameworks).Set the Install Name of each...
View ArticleAnswer by trojanfoe for How do I remove / hide source control notifications...
This Count Badge setting should do the trick:
View ArticleAnswer by trojanfoe for port command not found
You need /opt/local/bin in the $PATH.To add to $PATH:export PATH=/opt/local/bin:$PATH
View ArticleAnswer by trojanfoe for sending an email from a C/C++ program in linux
You could invoke your local MTA directly using popen() and feed it RFC822-compliant text.#include <stdio.h>#include <string.h>#include <errno.h>int sendmail(const char *to, const char...
View ArticleAnswer by trojanfoe for Dev-C++: 'prinft' undeclared
Typo:prinft()should be:printf()printf is short for "print formatted".
View ArticleAnswer by trojanfoe for Dependency fails to compile in workspace but not in...
@kmdreko is correct in that you need:resolver = "2"in the workspace Cargo.toml file as described in the beginner's guide.
View ArticleAnswer by trojanfoe for install_name_tool difference between -change and -id
Install NameThe term install name refers to the exact path of the .dylib file in the end-user system so the runtime linker can find and load the dynamic library.The name can be either:Absolute, which...
View ArticleAnswer by trojanfoe for Does "-dndebug" (lowercase) do anything in g++?
It's fairly easy to test:Test program test.cpp#include <iostream>int main(){#ifdef TEST_DEFINE std::cout << "defined" << std::endl;#endif return 0;}Result$ g++ -o 1 -DTEST_DEFINE...
View ArticleAnswer by trojanfoe for Is there a way to obtain the output of a linux...
You want popen(). Here's an example, taken from... (see below).void get_popen_data() { FILE *pf; char command[COMMAND_LEN]; char data[DATA_SIZE]; // Execute a process listing sprintf(command, "ps aux...
View ArticleAnswer by trojanfoe for How do I tell CMake to use Clang on Windows?
As an update for Visual Studio 2019 and 2022, you can install the clang-cl toolchain via the Visual Studio Installer and use this to generate a .sln file:> mkdir build && cd build> cmake...
View ArticleAnswer by trojanfoe for clang format: disable ordering includes
With more recent versions of clang-format it seems you need both:IncludeBlocks: PreserveSortIncludes: Never
View ArticleWill this RAII-style Objective-C class work?
Under C++, I have a Mutex class, and I use this RAII-style class to ensure the mutex is unlocked, regardless of the reason for the method return:class MutexLock {protected: Mutex &m_mutex;public:...
View ArticleAnswer by trojanfoe for Filling Buffer with Elements of Different Lengths...
Probably not what you’re looking for, but if I was approaching this problem I would be tempted to build a linked list of pointers to the elements first and have a function to flatten the list out into...
View ArticleAnswer by trojanfoe for XcodeCloud build fails with "The ci_pre_xcodebuild.sh...
You have violations in your swift code and that's how swiftlint is telling you. It should be outputting those violations to the console so you can see what they are.Also cd .. is weak; use something...
View ArticleAnswer by trojanfoe for How to create VStack within HStack with equal element...
I think you want scaledToFill() on both the VStack and the HStack:HStack(alignment: .center, spacing: 0) { ForEach(0...6, id: \.self) { _ in VStack(alignment: .center) { Text("T") } .frame(maxWidth:...
View ArticleAnswer by trojanfoe for How to create a view that can display multiple objects?
How about this?protocol ItemProtocol { func name() -> String func description() -> String func optionalThing() -> String?}struct Item1: ItemProtocol { var n: String var d: String var t: String...
View ArticleAnswer by trojanfoe for how to convert optional decimal type to String in swift
If you cast the conversion to Any, then that will work because the compiler is happy that either Decimal or String can used:import Foundationlet iAmNil: Decimal? = nillet iAmDecimal: Decimal? =...
View ArticleAnswer by trojanfoe for Optionally reference parent struct
You need to specify the life time of the reference to the parent. Something like this:use std::collections::HashMap;#[derive(Debug)]struct Value { _value: String,}impl Value { fn new(value: &str)...
View ArticleComment by trojanfoe on glfw Multi-Monitor Window Movement
What do you mean by glfw form?
View Article