如果你的PATH中有CB的bin路径 应该直接在DOS环境中就可以直接使用(就是假DOS)coff2omf命令帮助: COFF to OMF Converter Version 1.0.0.74 Copyright (c) 1999, 2000 ion Syntax: COFF2OMF [options] InputFile OutputFile -h, -? Display help -q Quiet mode -v Verbose mode -r Remove (delete) output file if empty -lib:xx Specify options for OMF import library generation: ms - Allow entries that have MS C++ name mangling (defaul st - Normalize names instead of aliasing MS stdcall mangl ca - Don't perform MS cdecl aliasing (default is to aliasCOFF2OMF will convert a COFF import library file (InputFile) to the corresponding OMF type import library file (OutputFile).
VC编写出来的lib需要用CB的工具coff2omf来转换一下
具体怎么转换,这个工具有帮助提示
我把coff2omf当成conff2omf在google里搜索了,结果没有搜索到.
如果用了MFC,一样可以用
这个是标准
我试一下,解决就给分.
应该直接在DOS环境中就可以直接使用(就是假DOS)coff2omf命令帮助:
COFF to OMF Converter Version 1.0.0.74 Copyright (c) 1999, 2000
ion
Syntax: COFF2OMF [options] InputFile OutputFile
-h, -? Display help
-q Quiet mode
-v Verbose mode
-r Remove (delete) output file if empty
-lib:xx Specify options for OMF import library generation:
ms - Allow entries that have MS C++ name mangling (defaul
st - Normalize names instead of aliasing MS stdcall mangl
ca - Don't perform MS cdecl aliasing (default is to aliasCOFF2OMF will convert a COFF import library file (InputFile)
to the corresponding OMF type import library file (OutputFile).
VC++中如下:extern "C" void _stdcall testlib(void);
void _stdcall testlib()
{
MessageBox(NULL, _T("sdfad"), _T("title"), MB_OK);
}然后我使用coff2omf进行了转换
在bcb中:
USELIB("bcblib.lib");
extern "C" void _stdcall testlib();然后调用 testlib();link总是不通过.
[Linker Error] Unresolved external 'testlib' referenced from C:\TEMP\BCBTEST\UNIT1.OBJ
我换了几种方式也不行,我bcb是初学者,不懂,请指教.谢谢了!