Saturday, December 30, 2017
Windows Application
when I start to test a demo Win32 application, I ran into several easy problems. take note now for future reference.
step 1: create a new project.
step 2: select Win32 application. do not use Wizards.
step 3: give your project a name, the press OK. then select "emptry Project".
step 4: add your files to project.
step 5: once the project files are created, you need manually select the static MFC class library.
you can set this through project property-> Configuation Properties-> General ->Use of MFC-> user MFC static library.
- FAQ: Cannot convert from 'const char [..]' to 'LPCTSTR'
- Cannot convert argument 1 from 'const char [5]' to 'LPCTSTR'
- td::wstring VS std::string
Problem
This error message means that you are trying to pass a multi-byte string (const char [12]) to a function which expects a unicode string (LPCTSTR). The LPCTSTR type extends to const TCHAR*, where TCHAR is char when you compile for multi-byte and wchar_t for unicode. Since the compiler doesn't accept the char array, we can safely assume that the actual type of TCHAR, in this compilation, is wchar_t.
Resolution
You will have to do one of two things:
1. Change your project configuration to use multibyte strings. Press ALT+F7 to open the properties, and navigate to Configuration Properties > General. Switch Character Set to "Use Multi-Byte Character Set".
2. Indicate that the string literal, in this case "Hello world!" is of a specific encoding. This can be done through either prefixing it with L, such as L"Hello world!", or surrounding it with the generic _T("Hello world!") macro. The latter will expand to the L prefix if you are compiling for unicode (see #1), and nothing (indicating multi-byte) otherwise.
Friday, December 29, 2017
Tuesday, December 26, 2017
Monday, December 25, 2017
stack frame
- Lecture 18: Intermediate Code
- Lecture 19: Efficient IL Lowering
- Stack Frame - Tim Teitelbaum
- Lecture 21: Generating Pentium Code
- Lecture 22: Implementing Objects
- Lecture 23: Introduction to Optimizations
- Lecture 24: Control Flow Graphs
- Lecture 25: Liveness and Copy Propagation
- The Call Stack
- The Call Stack
- 3. Activation Records
- The Call Stack
- x86 Assembly, Video 1: Move operations
- x86 Assembly, Video 2: x86-64 Assembly
- Procedures, Video 3: Stack-based languages
- Procedures, Video 4: Linux stack frame
- Procedures, Video 5: Registers and variables
- Procedures, Video 1: Stacks
- Procedures, Video 2: Call stack
- Procedures, Video 5: Registers and variables
- x86 Assembly Guide
- Lecture 12.1: The mechanics of function calls - Richard Buckland UNSW
- Lecture 12.2: The mechanics of function calls (part 2) - Richard Buckland UNSW
- 21:Everything u need 2 know about pointers -Richard Buckland
- 16: Frames (revision) - Richard Buckland (UNSW)
- 23: Stack Frames - Richard Buckland UNSW
- 21:Everything u need 2 know about pointers -Richard Buckland
- 21:Everything u need 2 know about pointers -Richard Buckland
- Procedures, Video 2: Call stack
- Procedures, Video 1: Stacks
- The Call Stack
- Call Stack, Scope & Lifetime of Variables
- x64 Assembly and C++ Tutorial 28: Stack Frames
- Writing a Function in Assembly: Intel x86 Att Assembly Stack Part 1
- Writing a Function in Assembly: Intel Att Assembly Stack Part 2
- GCC Calling Conventions: Intel Assembly Att Stack
- Stack and local variables: Intel Assembly Att
- Prologue: Intel x86 Assembly Att Stack
- x86 Assembly: Simple stack operation
- Top 20 ASM Instructions Every Programmer Should Know
- Using the Stack in Assembly Language
- x86 Assembly Crash Course
- Intro to x86 Assembly Language (Part 1)
- Intro to x86 Assembly Language (Part 2)
- x86 assembly language
- Intro to x86 Assembly Language (Part 3)
- 80x86 instruction set
- X86 Opcode and Instruction Reference Home
- x86 assembly language- wiki
- Call stack
- Build a Raspberry Pi 3 Cluster
- Bramble 4 or 6 Stack Case for Raspberry Pi 3 & Pi Drive~ Made by C4Labs
- Tiny Raspberry Pi 'Server Rack' / Cluster Case (4 slots) - V2
- HIGOLE F1 5 inch 720 x 1280 Mini PC Windows 10 / Android 5.1 - 4GB+64GB US PLUG
- GPD Pocket Mini Laptop UMPC - SILVER 2