Blogs

C++Builder 创建针对IOS Device的Static Library

用C++Builder 创建面向IOS Device的Static Library ,可以为Objective-C调用.
注意Objective-C那边需要引用libstdc++6.dylib

NativeControl和FMX Control的Bridge

XE6里面提供了一个native control和FMX control的bridge类
可以方便的嵌入native control
FMX.EmbeddedControls.pas

在mac osx上如何编译32位的libx265

注释掉
# if("${CMAKE_SIZEOF_VOID_P}" MATCHES Cool
# set(X64 1)
# add_definitions(-DX86_64=1)
# endif()

否则总是强制编译成64位的library

if(X86 AND NOT X64)
add_definitions(-march=i686)
endif()

在mac osx上应该是
if(X86 AND NOT X64)
add_definitions(-m32)
endif()
另外
if(APPLE)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho")
elseif(UNIX AND NOT CYGWIN)
应该改成
if(APPLE)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1 "-f macho -DPREFIX")
elseif(UNIX AND NOT CYGWIN)
否则编译出来的*.o的函数声明没有下划线,C编译的时候会找不到asm的函数

查看android的异常log

adb logcat | grep E/

无法登陆Drupal的解决方案

原因是Sessions表坏掉了,需要用phpmyadmin 来truncate一下session表就行了

IOS下一个异步加载图像的类

IPhone上手机性能不佳,批量加载网络图像时很慢,所以写了一个异步加载图像的类.
有待进一步实现的功能是图像的硬盘cache.

unit FMX.AsyncImage.IOS;

interface
uses FMX.Types,FMX.Graphics,System.Types, System.Generics.Collections, iOSapi.Foundation, Macapi.ObjectiveC, iOSapi.UIKit;

type
NSURLConnectionDelegate = interface(IObjectiveC)
['{682BABAC-89E0-4A9B-BFF5-96A7EE7881A6}']
end;

NSURLConnectionDataDelegate = interface(NSURLConnectionDelegate)
['{6F015871-FCF4-4F8D-B9E5-C6484D6F60E7}']
procedure connection(connection: NSURLConnection; didReceiveData: NSData); cdecl;

同步内容