본문 바로가기

분류 전체보기

(465)
PE Header
[RUST] rusqlite, LNK1181: cannot open input file 'sqlite3.lib' rust 로 간단한 sqlite 를 사용해 보려고, 유튜브 튜토리얼을 따라해 봤는데, cargo run 을 실행하니 에러가 발생했다. (개발환경은 windows 10) 에러메시지는 다음과 같다. = note: LINK : fatal error LNK1181: cannot open input file 'sqlite3.lib' error: could not compile `rust_sqlite_sample` (bin "rust_sqlite_sample") due to previous error 빌드과정에서 sqlite3.lib 를 찾을 수 없다는 메시지였다. rusqlite 라이브러리를 사용하는데, 라이브러리를 사용하기 위해 Cargo.toml 에 다음과 같이 설정했었었다. [dependencies] rus..
First chance exception 0X406D1388 크롬과 엣지에서 Exception 0X406D1388 덤프가 많이 발생했다. 덤프파일을 windbg 로 열어 analyze -v 를 실행한 스택내용은 다음과 같았다. (크롬 심볼서버 세팅함.) STACK_TEXT: KERNELBASE!RaiseException+0x6a chrome!base::PlatformThreadBase::SetName+0x1ae chrome!base::internal::ThreadGroupImpl::WorkerThreadDelegateImpl::OnMainEntry+0x74 chrome!base::internal::WorkerThread::RunWorker+0x81 chrome!base::internal::WorkerThread::RunPooledWorker+0x18 chrome!..
VSCode Swift Formatter 설정 2023년 9월 현재, vscode 에는 두개의 스위프트 포매터 익스텐션이 있는 것 같다. apple-swift-format 과 SwiftFormat. apple-swift-format 을 써왔었는데, 인덴트가 2로 포맷했다. 개인적으로 가독성이 안 좋았고, xcode 로 열어서 다시 편집하면 4 스페이스로 포맷을 해서, 쓸데없는 변경점이 만들어졌다. 그런데 인덴트를 설정하는 걸 잘 모르겠더라. --- 그래서 SwiftFormat 으로 설정하였다. brew install swiftformat 으로 우선 포매터 프로그램을 설치하고 (SwiftFormat 익스텐션은 swiftformat 이라는 커맨드라인 툴을 이용한다.), vscode 익스텐션들 중에 SwiftFormat 을 찾아서 설치하고 활성화한다. 이..
SIL ( Swift Intermediate Language ) 스위프트 중간 언어 스위프트 컴파일러가 .swift 소스파일을 컴파일하는 과정은 스위프트 언어를 스위프트 중간언어(swift intermediate language)로 우선 만들고, 이것을 다시 llvm IR ( intermediate representation ) 으로 바꾸고, 마지막으로 기계어를 생성하는 단계를 거친다. .swift 소스에서 변환된 SIL 을 보려면 swiftc 를 이용하여 -emit-sil 옵션으로 컴파일 하면 된다. swiftc -emit-sil .swift 아주 간단한 Point 스트럭쳐를 선언하여, 이를 sil 로 변환하면 다음과 같다. struct Point { let x:Int let y:Int } struct Point { @_hasStorage let x: Int { get } @_hasS..
macOS 파인더 빠른동작 메뉴에 "vscode 로 열기" 추가하기 윈도우에서는 vscode 가 설치되면 explorer 컨텍스트 메뉴에 자동으로 vscode 로 열기가 추가되어서 편리했던 것 같다. macOS 에서는 이 메뉴가 없어서 매우 불편했다. 그래서 설정하려고 찾아보니, finder 의 "빠른동작"으로 vscode 로 열기를 추가하는 방법이 있었다. https://thehotcode.com/macos-open-with-vscode-finder/ Add "Open with Visual Studio Code" in Finder Quick actions in MacOS If you already have a Windows computer, a nice feature when Visual Studio Code is installed is that… thehotcode...
SwiftUI] StateObject, Published, ObservableObject https://www.hackingwithswift.com/books/ios-swiftui/sharing-swiftui-state-with-stateobject swiftui 에서 struct 인스턴스 변수는 간단한 @State 로 (내부 프로퍼티의) 변경을 감지하여 UI에 반영할 수 있다. 하지만 class 인스턴스 변수는 @State 를 붙여도 내부 프로퍼티의 변경을 감지하지 못한다. class 의 내부 프로퍼티의 변경을 감지하도록 하는 방법은 다음과 같다. 1. 외부에서 변경을 감지하려는 클래스의 프로퍼티에 @Published 를 붙여준다. class User { @Published var name: String = "Micky" @Published var age: Int = 10 } 2. view..
[유튭링ㅋ] Mastering Concurrency in iOS 인도형의 유튜브 강좌. 발음이 좀 거북하지만, 매우 잘 정리해 준다. Mastering Concurrency in iOS - Part 1 (Concurrency, GCD Basics) https://youtu.be/X9H2M7xMi9E Mastering Concurrency in iOS - Part 2 (Dispatch Queues, Quality of Service, Attributes) https://youtu.be/yH0RBTdNi3U Mastering Concurrency in iOS - Part 3 (Dispatch Group, Dispatch Work Item) https://youtu.be/SGEWlYB6ZM0 Mastering Concurrency in iOS - Part 4 (Dispat..