昨天郁闷了一天,因为不管我如何编译,总是有错误产生。
没想到今天我清理掉所有文件,重新操作了一编,居然神奇般编译成功了。挖哈哈。。。太高兴了,终于离编译可运行在IPHONE
机器上的HELLO world 不远了,太激动了。。
总结一下:我昨天安装了管方列出的所有包,还有就是不放弃,多试几次。
Here we provide a list of packages for Debian/Ubuntu
apt-get install \
automake \
bison \
cpio \
flex \
g++ \
g++-4.3 \
g++-4.3-multilib \
gawk \
gcc-4.3 \
git-core \
gobjc-4.3 \
gzip \
libbz2-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
mount \
subversion \
sudo \
tar \
unzip \
uuid \
uuid-dev \
wget \
xar \
zlib1g-dev \
If you are on 64 bit please install:
apt-get install g++-4.3-multilib gcc-4.3-multilib gobjc-4.3-multilib
下面是编译完后的结果:
warf-strip/hello.c
A /home/ ......
终于到了编译范例的时候了,范例在APPS目录里,好兴奋呀。。。
开始编译:
zhaowei@zhaowei-ubuntu:~/toolchain/apps/HelloToolchain$ make
arm-apple-darwin9-gcc -lobjc -bind_at_load -framework Foundation -framework CoreFoundation -framework UIKit -w -o HelloToolchain HelloToolchain.o
ld: library not found for -lobjc
collect2: ld returned 1 exit status
make: *** [HelloToolchain] 错误 1
看见没有,又报错了。在官方讨论区我找到解决方法。看下面:
Here's the solution I used (thanks brian.cr...):
Build the toolchain
In ~/Projects/iphone/toolchain/toolchain/sys, rename folder System to System2
In ~/Projects/iphone/toolchain/toolchain/sys/usr, rename folder lib to lib2
Copy folder ~/Projects/iphone/toolchain/sdks/iPhoneOS3.1.2.sdk/System to ~/Projects/iphone/toolchain/toolchain/sys
Copy folder ~/Projects/iphone/toolchain/sdks/iPhoneOS3.1.2.sdk/usr/lib to ~/Projects/iphone/toolchain/toolchain/sys/usr
Try to build HelloToolchain? again using instructions on this page (above).
Hope that help ......
On 05/02/2010 04:31, Larry Hall (Cygwin) wrote:
> On 02/04/2010 08:36 PM, phil song wrote:
>> Hi,cygwin,
>> when I compile some project in cygwin,It prompts
>>
>> /cygdrive/g/work_platform/open-s/ftk-0.2/src/os/linux/ftk_linux.h:43:22:
>> linux/fb.h: No such file or
>> directory
>> /cygdrive/g/work_platform/open-s/ftk-0.2/src/os/linux/ftk_linux.h:44:22:
>> linux/kd.h: No such file or
>> directory
>> /cygdrive/g/work_platform/open-s/ftk-0.2/src/os/linux/ftk_linux.h:45:25:
>> linux/input.h: No such file
>> or directory
>>
>>
>> who can tell me how to operate to let fb.h in cygwin enviroment?
>
> You can't. You're compiling code built to depend of Linux-specific
> features. If you want to build it on another platform, you're going
> to need to figure out what it's doing on Linux and figure out how
> to accomplish that on the target platfor ......
SQL Server 得到行号的SQL
使用临时表:
select id=identity(int,1,1),value into #temp from YourTable
select * from #temp
drop table #temp
取得第11到20行记录:
select IDENTITY(int, 1,1) AS ID_Num,* into #temp from 表
select * from #temp where ID_Num>10 and ID_Num<=20
或
SELECT Top @PageSize *
from T
WHERE SortField NOT IN (SELECT TOP @PageSize * @Pagei SortField
......
一:Select语句:
select 字段名 from 表名 where 条件 order by 排序
see:select distinct 从多个相同字段中抓唯一值
see:查找ld_det_andy表中有数据但ld_det_temp表中没数据的数据
select * from ld_det_andy a where
(not exists (select * from ld_det_temp where ld_loc = a.ld_loc and ld_part = a.ld_part))
see:选出累计访问量最大的10个ip地址,并按访问量降序排列。
select top 10 ip, countip from
(select ip,count(*) as countip from records group by ip) a
order by countip desc
see:表student(id,name,score)根据分数列(score)每10分为一段,查询每段分数的人数
select ScoreRank,count(*) from
(select ScoreRank = case
  ......
DB2 SQL PL
SQL PL是DB2所支持的过程化语言,它是SQL/PSM标准的一个子集。其根据应用范围不同,又分为Inline SQL PL,Embeded SQL PL和Compiled SQL PL。
Inline SQL PL
适用范围:触发器、函数和方法,支持部分SQL PL,使用时要注意一些限制
语法规则:BEGIN ATOMIC ... END
Embeded SQL PL
适用范围:嵌入式,配合宿主语言一起使用,有点类似于PowerBuilder编程形式
语法规则:BEGIN COMPOUND [ATOMIC|NOT ATOMIC] STATIC ... END
Compiled SQL PL
适用范围:支持所有的SQL PL
语法规则:BEGIN ... END
SQL Routine
包括过程、函数和方法(method),所谓的方法就是按照目的不同而创建出的概念,用于操作某个自定义类型(CREATE TYPE ...)的方法,有些类似于PL/SQL的面向对象概念。
DB2对PL/SQL的支持
DB2支持Oracle的PL/SQL,但在默认情况下这个功能是被关闭的,只有通过手动打开。
启动步骤:
db2start
db2set DB2_COMPATIBILITY_VECTOR=ORA
db2set DB2_DEFERRED_PREPARE_SEMANTICS=YES
db2stop
db2start
db2 CREATE DATABASE DB
测试结果:
CONNECT TO DB;
SET SQLCOMPAT PLSQL;
-- Semicolon is used to terminate
-- the CREATE TABLE statem ......