云淡风清

记录我在国大半年的生活,但愿我不要太懒,呵呵

歪酷博客
 
 
· 所有网志 · 心情日记 · 胡言乱语 · 点滴琐事 · 天天向上 · 他山之石 · 私房话 · 狮城旧事 · 未分类 ·
 
丰雪 @ 2005-10-28 23:49

还是为了查NIST的网址回来的,光密码就试了三次,汗……

翻翻一年前的文章,想当年还是多么风华正茂的一少年,激情不在矣。。。


 
丰雪 @ 2005-05-04 14:35

心头堵了很多东西,呼之欲出,晚上不出去的话就来这里写点东西吧~

希望我不要食言,^_^


 
丰雪 @ 2005-04-06 14:14

冰凌


雪松


雪人




去食堂的路上


花菜。。。


尖尖角




 
丰雪 @ 2005-04-06 14:01

刚回来的时候还保留着出门带相机的好习惯,路过静安寺,随手拍的












久光门口的圣诞树



花环


红极一时的百乐门






纸醉金迷


门口的海报




 
丰雪 @ 2005-04-06 13:28

今天闲着,随便贴些照片吧~

寒假在家随便拍的

古玩市场门口的街景








 
丰雪 @ 2005-04-01 23:59

这样的夜晚,这样的故事,这样的歌……

拨动着心中的某根弦,不由自主地流泪了,

还是很脆弱啊,为了一个虚拟的故事,感动如斯,sigh:~(


 
丰雪 @ 2005-03-18 00:00

今天编程进度=0>.<,因为根本没做,呵呵

上午参加了本学期第一次小组会,老板布置了大家的任务,提了些制度啊要求啊虾米的。

眼前的形势是:近期工作紧迫,远期任重道远:(,唉唉

最最最麻烦的是——以后每天8:30-9:00得到实验室:[:|^^|

呜呜,我可怜的床啊,明天开始就不能多陪你了,你要乖,自己照顾自己,不要太想我。。。。

(嗯,快点涂完这个帖子,我要早点去睡了,已经几百年没在八点以前起床了,sigh)

下午去了久闻大名的北京东路买零件,

从来没逛过五金电子城,要买的东西还是进口的,很难找到匹配产品,

像无头苍蝇一样在里面转了好久~~~好久~~~~

对于电子城之大~之黑~有了深刻的感性认识:~(

还好多走了几家,最大件的东东没被黑去,其他小的几块钱也只能认了,

谁让我们一副菜鸟样,又每样只买一两个,不坑我们坑谁呢-,-b

//以下和工作无关 ( “//"—— c++里标注的格式,呵呵,最近编程编多了)

从北京东路出来,顺道去了南京路逛街,难得忙里偷闲出来放风,不好好利用岂不可惜,嘿嘿:#

十里洋场,纸醉金迷,我们这些穷学生,只能是繁华外的看客,

每次逛街,看到n多喜欢而买不起的东西,总是无比胸闷--|

最后收获皮鞋一双,聊以告慰心灵。

就这样吧,实在累了,明天还得早起,逛街部分略去300字,over











 
丰雪 @ 2005-03-16 23:56

MR-H部分完成,

其中数据合法性检验,磁场正负判别,电源换向时刻等细节工作耗费了我不少时间,在编数据归一化部分

的时候学会了创建多个窗口及窗口之间的相互调用,我总是边用边学+--

MR-V部分界面设计完成,明天继续编码的工作。

留下的问题:

1,昨天的异常处理经过修改,完善了一些,但还是有些小问题,留待日后解决;

2,后面两个模块都必须用电压源,测量电流,考虑是否把前两个模块也换成电压源,方便以后的使用。

over


 
丰雪 @ 2005-03-16 00:10

上午试图在C++ Builder加载DLL的,系统报错:

[Linker Error] DSOUND.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

查help,google,bbs,用了很多种方法下午上课前才终于解决了问题:~(,

实验室的机器不能上国外的网,换了很多代理可大部分国外的论坛还是上不去,严重影响了debug效率。

记于此备忘!

Q: How to fix linker errors that say: "Invalid OMF record type 0x21 (possibly COFF)"


Answer
This error usually occurs when you try to link with a LIB file or an OBJ file that is not compatible with Borland's OMF file format. This typically happens when dealing with libraries from third party vendors. Often times, the third party vendor will supply you with a LIB file that is in Microsoft's COFF format. The Microsoft COFF format is incompatible with Borland's OMF format.

The best solution is to obtain Borland compatible files from the third party vendor. Unfortunately, many third party vendors will simply ignore you. If this happens to you, your choices are limited.

If the LIB file is an import library for a DLL, you can create a Borland compatible import library using Borland's IMPLIB tool. All you need to do is pass IMPLIB the name of the DLL. IMPLIB will generate a Borland compatible import library. Link with that library instead of the one from the vendor. Another option is to use Borland's COFF2OMF tool on the Microsoft import library. I prefer to use IMPLIB if the DLL is available. For more details on how to call an MSVC DLL from BCB, see the article at http://www.bcbdev.com/articles/vcdll.htm.

 Note:
--------------------------------------------------------------------------------
IMPLIB and COFF2OMF will only work if the library and DLL export plain, C functions. If they export C++ classes or mangled function names, then you will get linker errors, or possibly errors while generating the Borland compatible import library. If you run into this problem, see the C++ DLL article at http://www.bcbdev.com/articles/vcdll2.htm.
--------------------------------------------------------------------------------



If the LIB file is a static library instead of an import library (static libraries contain real code, import libraries are just stubs for DLLs), then the situation becomes more convoluted. You cannot link MSVC static libraries with your BCB project. You can't easily convert the library from COFF format to OMF either. Borland's COFF2OMF tool only works on import libraries. The only clean solution is to use MSVC to create a DLL or a COM object that wraps the static library. Create a DLL with MSVC that exports a wrapper function for each routine in the static library. If the static library contains C++ classes, then you could be in for a rough ride. Consult the article at http://www.bcbdev.com/articles/vcdll2.htm. It describes how to wrap a C++ DLL with a Borland compatible DLL. Static C++ libraries are not quite the same, but they are very similiar. The techniques involved are practically the same.

If you have been given raw OBJs, then you follow the same advice from the preceding paragraph regarding static libraries. Static libraries are more or less collections of OBJ files. So it makes sense that you would have to follow the same, rather unpleasant, course of action. Create an MSVC wrapper DLL for the code in the OBJ, and call the DLL from your BCB application.


                       COFF2OMF
                             Convert Object and Lib Files to OMF
Digital Mars tools all work with the Intel 32 bit OMF object and library file format. Microsoft's 32 bit tools work with Microsoft's own variant of the COFF format. Many such COFF format files can be converted to OMF with the coff2omf program:
coff2omf inputfiles...

The input files can be either object files (.obj) or library files (.lib). They are converted in place to OMF.
For example, to convert user32.lib from COFF to OMF:

coff2omf user32.lib

The Microsoft COFF format apparently changed with Visual C++ 6.0. To use coff2omf on a .lib file with the newer format, use Microsoft's linker to convert the file to the earlier COFF format:
link /lib /convert file.lib

and then use coff2omf on it.


                                         IMPLIB
                                            Build an Import Library
An import library is necessary when calling functions in a DLL; it provides the stubs that hook up to the DLL at runtime. IMPLIB is used to create import libraries. It uses as input either the DLL itself or a module definition (.def) file.
implib commands have the following format:

implib [switches] libfile [ dllfile | deffile ]

libfile is the name of the import library file to create. .lib is the default extension.
dllfile is the name of the DLL to create an import library for. .dll is the default extension.
deffile is the name of the DLL's module definition file. The extension .def is required.
switches
/? Print this message.
/b[atch] Batch.
/h[elp] Print this message.
/i[gnorecase] Ignore case of symbols.
/noi[norecase] Be case sensitive. Mark library as case sensitive.
/nol[ogo] Ignored.
/now[ep] Ignore WEP (relevant only to 16 bit DLL's).
/ntd[ll] Ignored.
/p[agesize]:number Set page size to number (a power of 2).
/s[ystem] Prepend '_' to exported internal names. Used to create import library from Windows NT system DLLs (for example, kernel32.dll). Note that this switch is not available via the IDDE.
Either a dllfile or deffile must be given (but not both). IMPLIB reads the file, and uses the export records in it to create an import library libfile. libfile is then linked in with your application.
To create the import library kernel32.lib from the NT system dll kernel32.dll:

implib /s kernel32.lib kernel32.dll

Module definition files are in the same format as that used to create the DLL.

还要注意的是 coff2omf.exe 和 implib.exe 等程序都只能在windows控制台下运行,我找到这两个exe文件后,傻傻得点击了好久,就是不知道该怎么用,太土了,唉-,-b


解决了dll问题以后,后来的编程工作势如破竹,MR-H部分也快完成了,唯一懊恼的是各个环节的异常处理,总是没办法做得很严密,还把程序搞得支离破碎,可读性太低了。明天找高手问问有没有逐行检查状态的语法,try{...},catch{...}的自定义异常声明看不懂,不会用,555

晚上回来时,工作中断于和METERSOURCE通讯,置电流大小这一句,明天去查查具体什么错误,over   


 
丰雪 @ 2005-03-15 00:24


风雨无阻

演唱:周华健

给你我的全部 你是我今生唯一的赌注
只留下一段岁月 让我无怨无悔 全心的付出
怕你忧伤怕你哭 怕你孤单怕你糊涂
红尘千山万里路 我可以朝朝暮暮

给你一条我的路 你是我一生不停的脚步
让我走出一片天空 让你尽情飞舞 放心的追逐
爱是漫长的旅途 梦有快乐梦有痛苦
悲欢离合人
间路 我可以缝缝补补

提着昨日种种千辛万苦
向明天换一些美满和幸福
爱你够不够多 对你够不够好
可以要求不要不在乎
不愿让你看见我的伤处
是曾经无悔的风雨无阻
拥有够不够多 梦的够不够好
可以追求不认输


不知道为什么,刚才听这首歌忽然被深深打动了-o-

音乐真是很奇妙的东西,说不清会在电光石火的某一瞬,忽然深至心灵,思绪万千……

向来是个没多少音乐细胞的人,这样的瞬间于我而言便格外珍贵了,故郑重收于此以示欣喜之情,hoho


 
日 历
最 新 的 评 论
搜 索
友 情 链 接
· 歪酷博客
· 管理我的Blog
· terrans留言簿
· 图片上传空间
· NIST
· fotocn
· delloy
· ljl
· sssjjj
· qiyi
· fanqie
· shirleysun
· bingqilin
· yorda
· xingdm
· fredyan

订阅 RSS

0042442

歪酷博客