Compiler

RSS for tag

Discuss the various compiler and toolchain technologies used in development.

Posts under Compiler tag

101 Posts
Sort by:
Post not yet marked as solved
1 Replies
316 Views
I am trying to run a python script which includes a wrapper for a c++ code. The script runs on a linux machine without any issues. When I compile the c++ part with make, it throws me this error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__filesystem/path.h:446:1: fatal error: declaration of anonymous class must be a definition class _LIBCPP_EXPORTED_FROM_ABI path { ^ 1 error generated. Can anybody help me with fixing this? Thanks! I tried re-installing both the Command Line Tools and XCode but nothing seems to work. I do not have any anaconda/brew/ports installed.
Posted Last updated
.
Post not yet marked as solved
2 Replies
573 Views
I got this error when compiling a fortran code using the new version of CLToolkit 15.3 (with 15.1 I have no problems at all): In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/_stdio.h:68, from /usr/local/lib/gcc/aarch64-apple-darwin22.2.0/13.0.0/include-fixed/stdio.h:78, from /Users/meanapanedar2/programming/SIMPLE/src/jpg/stb_image.h:307, from /Users/meanapanedar2/programming/SIMPLE/src/jpg/stb_image_write.c:14: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:30: error: missing ')' after "__has_attribute" 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:31: error: ':' without preceding '?' 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ In file included from /usr/local/lib/gcc/aarch64-apple-darwin22.2.0/13.0.0/include-fixed/math.h:45, from /Users/meanapanedar2/programming/SIMPLE/src/ops/simple_kbinterpol_memo.c:2: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:30: error: missing ')' after "__has_attribute" 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:31: error: ':' without preceding '?' 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/ConditionalMacros.h:61, from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/MacTypes.h:41, from /Users/meanapanedar2/programming/SIMPLE/src/fileio/simple_posix.c:15: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/TargetConditionals.h:140:50: error: missing binary operator before token "(" 140 | #if !defined(__has_extension) || !__has_extension(define_target_os_macros) | ^ In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/types.h:75, from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/MacTypes.h:48: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:30: error: missing ')' after "__has_attribute" 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/sys/cdefs.h:554:31: error: ':' without preceding '?' 554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage) | ^ [ 7%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/defs/simple_defs.f90.o [ 7%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/xml/fsys/fox_m_fsys_parse_input.F90.o make[2]: *** [lib/CMakeFiles/SIMPLE3.0.0.dir/ops/simple_kbinterpol_memo.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 7%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/ops/json_parameters.f90.o [ 7%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/xml/fsys/fox_m_fsys_count_parse_input.F90.o [ 7%] Building Fortran object lib/CMakeFiles/SIMPLE3.0.0.dir/xml/fsys/fox_m_fsys_format.F90.o make[2]: *** [lib/CMakeFiles/SIMPLE3.0.0.dir/jpg/stb_image_write.c.o] Error 1 make[2]: *** [lib/CMakeFiles/SIMPLE3.0.0.dir/fileio/simple_posix.c.o] Error 1 make[1]: *** [lib/CMakeFiles/SIMPLE3.0.0.dir/all] Error 2 make: *** [all] Error 2
Posted
by rmeanapa.
Last updated
.
Post not yet marked as solved
1 Replies
287 Views
In the file InventoryManager when I return Inventory appears: Missing argument for parameter 'from' in call also in ContentView InventoryManager.swift import Foundation class InventoryManager { static let shared = InventoryManager() private let key = "inventory" func saveInventory(_ inventory: Inventory) { if let encoded = try? JSONEncoder().encode(inventory) { UserDefaults.standard.set(encoded, forKey: key) } } func loadInventory() -> Inventory { if let data = UserDefaults.standard.data(forKey: key), let decoded = try? JSONDecoder().decode(Inventory.self, from: data) { return decoded } return Inventory() // <-- HERE } } ContentView.swift import Foundation import SwiftUI struct ContentView: View { @State private var inventory: Inventory = Inventory() // <-- HERE var body: some View { TabView { ... etc
Posted Last updated
.
Post not yet marked as solved
1 Replies
360 Views
I am developing a piece of software with OpenMPI and every time I recompile the program, I am prompted to click Allow/Deny the connections in N pop-ups (where N is the number of spawned processors by MPI). Is there any way to completely disable the pop-ups? When I allow or deny the access for one particular binary, the pop-ups do not show in successive runs. However, after recompiling a new one, the issue persists. Turning off the firewall does not help, neither does allowing/blocking incoming connections in the Firewall settings (Settings -> Firewall -> Options). I am open to any hacky solution or a workaround as this is really annoying and deteriorates my workflow.
Posted
by pajdox.
Last updated
.
Post marked as solved
5 Replies
461 Views
Hello guys this is my first time trying to publish an App on iOS. I am using Xcode version 13.0 beta I am getting this Semantic Issue error while archiving the build. if (@available(iOS 15.0, tvOS 15.0, *)) _displayLink.preferredFrameRateRange = CAFrameRateRangeMake(targetFPS, targetFPS, targetFPS); You can check the image.
Posted Last updated
.
Post not yet marked as solved
1 Replies
373 Views
I have implemented the new cpp-swift interop mechanism using modulemap file. I have a use case to pass a swift string to the cpp function. I observed that the below code works and I am able to pass a swift String type directly to a cpp function which received it as const char *. This works only if its received as const char * in cpp(and not char *). However, this is not an interop documented behaviour for interoperating String types and wanted to know whether this is safe to use. If not, can someone suggest an alternative approach to pass a swift string to Cpp. // Swift code public static func StringToCharPointer () -> Void { // calling cpp function and passing a swift String type as argument, which is received as const char * Student.Convert (sUItextdata) //sUItextdata is of type 'String' } //static Cpp function void Student::Convert (const char * pStr) { std::string s(pStr); std::cout << "char * converted from swift String : " << s << std::endl; } Note : I am aware that there is a way to pass it to cpp and receive it as std:string, but I do not wish to use that.
Posted Last updated
.
Post not yet marked as solved
1 Replies
452 Views
I've been using a code that pass -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ during compilation. The code was compiling well for a while. I haven't been using that project for a while, but recently found out that my project start failing to build with errors: In file included from my_project/main_app.cpp:52: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_time.h:32: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_types.h:109: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_region.h:47: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/machine/vm_param.h:33: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/vm_param.h:97: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_page_size.h:59:44: error: expected ';' after top level declarator extern vm_size_t vm_kernel_page_size __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); My /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h file contains #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED ... #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) ... #else #define __OSX_AVAILABLE_STARTING(_osx, _ios) #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) #endif but the last #else case is never hit because /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternal.h contains: #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED #if defined(__has_builtin) && __has_builtin(__is_target_os) #if __is_target_os(macos) #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_2 #endif #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_2 #endif /* __has_builtin(__is_target_os) && __is_target_os(macos) */ #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ So in combination with my initial -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ option the #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ produce an empty define. So the question to apple developers: could you please update #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ to #elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)? Or even change #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED to #if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)? Otherwise the #else case in Availability.h described above does not make any sense. Best regards, Petro
Posted Last updated
.
Post not yet marked as solved
0 Replies
452 Views
Hello, I am a new user with an Apple MacBook Pro. I'm experiencing difficulties running my code through the GPU. What do I need to install on my computer to be able to use libraries for machine learning, Computer Vision, PyTorch and Tensor Flow? I already watch lot of tutorials on this subject, but still is looks very complicated and I need mentoring for this task. I would greatly appreciate it if I could receive a response and if someone could guide me on this matter.
Posted
by Oz_y.
Last updated
.
Post not yet marked as solved
1 Replies
434 Views
I am now using the fortran compiler to compile the codes with the command of "make -f Makefile". In the previous time, the command: make -f Makefile works well, but after updating the MacOS system, the same command results in the following error: -macosx_version_min has been renamed to -macos_version_min ld: unknown options: -commons collect2: error:ld returns 1 Is there anyone know how to solve the above problem? Thanks a lot for your time and help.
Posted
by myfeng.
Last updated
.
Post not yet marked as solved
1 Replies
369 Views
I have a project implementing new interop mechanism and I m able to successfully invoke swift class method directly from swift. However, when I try to invoke the swift extension method it produces an error : No member named 'GetExtData' in 'InteropExtension::SwiftCode' Below is my cpp code: #include "CppSource.hpp" #include "InteropExtension-Swift.h" void CppSource::CppToSwiftCall() { // successfull call InteropExtension::SwiftCode::GetClassData(); //Below call is causing error. Why is swift extension method not invoked? InteropExtension::SwiftCode::GetExtData(); } Below is my swift code: import Foundation public class SwiftCode { public static func GetClassData () -> String { return "classMethod" } } extension SwiftCode { public static func GetExtData () -> String { return "ExtMethod" } } Can someone helpout on why is the extension methods not being invoked, and how can I invoke it?
Posted Last updated
.
Post not yet marked as solved
3 Replies
421 Views
I'm encountering an **error Segmentation fault: 11 ** during the archiving process. If the issue is happing with the my code. Then how can I diagnosing the problem. or figure out pin point in code base? I changed the compiler optimization level. It works for me when I use the Osize compiler optimization level. Previously, it was set to Ospeed. Want to know about the impact of the Osize compiler optimization level on the app.
Posted Last updated
.
Post not yet marked as solved
0 Replies
339 Views
We are having a setup , where we generates .app file from our iOS project using this command xcodebuild -scheme MyApp -project ./MyApp.xcodeproj -configuration Release\ (Development) -derivedDataPath build/derived_data -destination 'generic/platform=iOS' -archivePath build/MyApp.xcarchive archive which is work fine. but we have a new library that uses new swift Macros, that we can’t anymore use this command without errors. so we switched to -destination 'platform=iOS Simulator,name=iPhone' now it compile fine. but when adding the .app file to simulator , it just crash the app. is there a better way to generate such file that can work on simulator without try to enforce x86_64. cause it seems that macros are not supporting that.
Posted Last updated
.
Post marked as solved
2 Replies
297 Views
Does Swift has the syntax that lets me get the default value of a template type T, like below: struct VarLock<T> { private var v = default(T) // or T() }
Posted
by imneo.
Last updated
.
Post marked as solved
1 Replies
329 Views
I know this is a frequently asked question, but... After reading many articles on the net, I am still not sure if I have a solid understanding of the logics behind the design. One of my puzzles around this question is - Is the Swift compiler clever enough so that I can solely rely on its warnings/errors?
Posted
by imneo.
Last updated
.
Post not yet marked as solved
0 Replies
440 Views
Hi, I'm having problems with extremely build and compilation of software in the command line and I'm not sure why. I'm currently using macOS Sonoma 14.3 on my 2020 MacBook Air 1.1 GHz Quad-Core Intel Core i5. I also have the latest version of Xcode installed. Although I've been experiencing extreme delays in the command line for a while, the problem really became noticeable after I updated my OS to Sonoma. It meant that all the software I had installed via command line that I regularly use became outdated and now I cannot build it again. I've spoken in depth with the authors of the software and they have tried on a system identical to mine and have a build time of 30 minutes, but my machine takes over 3 hours on the same software. I've uninstalled and reinstalled command line tools several times but nothing seems to work. Also when I build I use the command make -j7 to use 7/8 cores so the problem isn't that I'm making full use of my CPU either. I've spoken to Apple support who recommended I try in Safe Mode and using a different user to rule out background software that opens on start up and decreases performance, as well as to rule out the setup on my main user. I'm just not sure what to do anymore as I've been trying for days and to no avail. Does anyone have any suggestions? P.S. It may be irrelevant, but since Sonoma I've also been experiencing a lot of issues with clang and also SDK pathways.
Posted
by alexgav02.
Last updated
.
Post not yet marked as solved
5 Replies
449 Views
I have a project that has Cpp code and swift code and I m making some calls from swift to cpp. For this I m using the Cpp-swift interop mechanism introduced in swift 5.9 for making direct calls between swift and cpp. I m using module.modulemap file to expose the cpp code to swift. I am facnig an error when I try to access a cpp header that are using the cpp compiler flags in some static assert statements. These methods are working fine in cpp however, when I try to access these methods from swift using the modulemap file, the compiler flags are not being identified by swift, and produces the below error error: use of undeclared identifier 'TW_KERNEL_WINDOWS'. This is my module.modulemap file: module CoreModule { header "ProcessStates.hpp" //cpp header that contains compiler flags export * } below is the cpp header code that I m trying to access in swift: #pragma once // if the given condition is false – treat as an error #define STATIC_CHECKFALSE(condition, message) static_assert (condition, message) STATIC_CHECKFALSE ((TW_KERNEL_WINDOWS == 0) || (TW_KERNEL_WINDOWS == 1), "TW_KERNEL_WINDOWS can only be 0 or 1"); Can someone help, why is this happening and how to resolve this?
Posted Last updated
.
Post marked as solved
3 Replies
621 Views
Hello everyone! I'm quite new to App development (but have quite a bit of programming experience). I have reached the point where I would like to Archive my app for release but I'm stumped at an issue where the app compiles, builds and runs just fine in XCode on device and simulator targets however fails when I want to archive the app. My app ends up using a mix of a lot of things possible: Swift and SwiftUI Obj-C and some vanilla C, mainly because I use a framework in C Very minimal but some UIKit (that bridges with some parts in C) Here is the stacktrace, would appreciate some insights 1. Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) 2. Compiling with the current language version 3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for CamHero) 4. While running pass #12497 SILModuleTransform "PerformanceSILLinker". 5. While deserializing SIL function "$s7SwiftUI11EnvironmentV12wrappedValuexvg" 6. While deserializing SIL function "os_log_type_enabled" 7. *** DESERIALIZATION FAILURE *** *** If any module named here was modified in the SDK, please delete the *** *** new swiftmodule files from the SDK and keep only swiftinterfaces. *** module 'SwiftUI', builder version '5.9.2(5.9.2)/Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)', built from swiftinterface, resilient, loaded from '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/prebuilt-modules/17.2/SwiftUI.swiftmodule/arm64-apple-ios.swiftmodule' result not found (isEnabled) Cross-reference to module 'os' ... OSLog ... in an extension in module 'os' ... isEnabled ... with type (OSLog) -> (OSLogType) -> Bool Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 swift-frontend 0x0000000103a11abc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56 1 swift-frontend 0x0000000106677cb0 llvm::sys::RunSignalHandlers() + 112 2 swift-frontend 0x00000001063e1054 SignalHandler(int) + 352 3 libsystem_platform.dylib 0x00000001895b3a24 _sigtramp + 56 4 libsystem_pthread.dylib 0x0000000189584cc0 pthread_kill + 288 5 libsystem_c.dylib 0x0000000189494a40 abort + 180 6 swift-frontend 0x0000000102bd7c2c (anonymous namespace)::ParsedAttrInfoFallThrough::~ParsedAttrInfoFallThrough() + 0 7 swift-frontend 0x0000000104470db8 std::__1::__function::__func<swift::evaluator::PerRequestReferences swift::evaluator::PerRequestReferences::makeEmpty<swift::LookupPrefixOperatorRequest>()::'lambda'(void*), std::__1::allocator<swift::evaluator::PerRequestReferences swift::evaluator::PerRequestReferences::makeEmpty<swift::LookupPrefixOperatorRequest>()::'lambda'(void*)>, void (void*)>::operator()(void*&&) + 0 8 swift-frontend 0x0000000102b2c534 swift::ModuleFile::fatal(llvm::Error) const + 44 9 swift-frontend 0x00000001044721dc swift::CyclicalRequestError<swift::LookupPrefixOperatorRequest>::~CyclicalRequestError() + 0 10 swift-frontend 0x00000001045bb880 swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 1588 11 swift-frontend 0x0000000102bb0f50 swift::SILDeserializer::getFuncForReference(llvm::StringRef, swift::SILType) + 504 12 swift-frontend 0x00000001045cb578 swift::SILDeserializer::readSILInstruction(swift::SILFunction*, swift::SILBuilder&, unsigned int, llvm::SmallVectorImpl<unsigned long long>&) + 29524 13 swift-frontend 0x00000001045bc554 swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 4872 14 swift-frontend 0x00000001045d6934 swift::SILDeserializer::lookupSILFunction(swift::SILFunction*, bool) + 636 15 swift-frontend 0x0000000102c4d990 swift::SILLinkerVisitor::deserializeAndPushToWorklist(swift::SILFunction*) + 88 16 swift-frontend 0x0000000102c4dfb0 swift::SILLinkerVisitor::processFunction(swift::SILFunction*) + 248 17 swift-frontend 0x0000000103c60fa4 (anonymous namespace)::SILLinker::run() (.llvm.15023899450236721039) + 136 18 swift-frontend 0x0000000106018874 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 16276 19 swift-frontend 0x00000001061c21c4 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56 20 swift-frontend 0x00000001060646b8 llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 476 21 swift-frontend 0x000000010607c424 swift::runSILOptimizationPasses(swift::SILModule&) + 472 22 swift-frontend 0x000000010400c3c0 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 572 23 swift-frontend 0x0000000105f59454 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 956 24 swift-frontend 0x0000000105f54f00 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 3020 25 swift-frontend 0x0000000105f58854 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4568 26 swift-frontend 0x0000000105fbfd44 swift::mainEntry(int, char const**) + 4408 27 dyld 0x00000001892090e0 start + 2360 Command SwiftCompile failed with a nonzero exit code
Posted
by borarak.
Last updated
.
Post not yet marked as solved
2 Replies
640 Views
Is there any way to get an unnamed property of a tuple given its position? Like below: let record = ("field1", "field2") func getRecordFieldValue(at: Int, of record: (String, String)) -> Any? { // pseudo code record.[at] }
Posted
by imneo.
Last updated
.
Post not yet marked as solved
2 Replies
393 Views
Using Xcode 15.2, x86_64, and for the life of me, I can't figure out how to declare a data structure in assembly. All the "current"ish references I've read for Clang LLVM & "as" assembly have no references to data structure directives. Tons of different types of sections, but I haven't seen any that would apply. I've looked at .bss, and while I can defines different fields in it, it still reserves space in the program, and I don't need space reserved - I just need a data structure definition so I'm not using magic numbers. Perhaps there is a utility to convert a C struct to an assembly struct that I haven't seen? Surely there has to be a way to define a data structure in assembly.
Posted
by toddburch.
Last updated
.