LINK1104:无法打开文件“OLDNAMES.LIB”

主开发环境已经切换到VS2010,为了验证成果在VS2005环境的兼容性,建立虚拟机,使用VS2005编译项目,竟然遭遇链接错误,如题。

google一下,发现有人牢骚: What the hell is OLDNAMES.LIB,自然也有人([MSFT]组的Jeff Abraham)解答: Can you see if this helps you。摘要如下:

This bug has been fixed in builds more recent than beta 2. It comes from the fact that the compiler we use is built off of the desktop compiler, which assumes that this library is available and implicitly adds it to the dependencies. You can work around this error in many different ways, the easiest is to pragma the library out.
BETA版的VS2005有这个缺陷。就是说,我使用的VC8编译、链接工具是BETA版的。
根据引用\[1\]中的代码,你可以使用以下步骤来批量修改txt文件名: 1. 使用dir函数导入需要修改文件名的文件的文件名。 2. 使用regexp函数提取学号,并进行匹配。 3. 根据需要的元素组成新的文件名。 4. 使用批量改名的方法将文件名修改为新的文件名。 具体的代码如下所示: ```matlab % 1. 导入需要修改文件名的文件的文件名 fileInfo = dir('*.txt'); % 2. 提取学号并进行匹配 oldNames = {fileInfo.name}; studentIDs = regexp(oldNames, '(\d+)', 'match'); % 3. 组成新的文件名 newNames = cellfun(@(x) \[x{1}, '_姓名.txt'\], studentIDs, 'UniformOutput', false); % 4. 批量改名 for i = 1:length(fileInfo) oldName = fileInfo(i).name; newName = newNames{i}; movefile(oldName, newName); end ``` 这段代码会将当前目录下的所有txt文件的文件名修改为【学号_姓名.txt】的格式。你可以根据需要修改代码中的正则表达式和新文件名的格式。 #### 引用[.reference_title] - *1* *2* [Matlab 文件名批量更改为统一格式](https://blog.csdn.net/weixin_44372736/article/details/131325931)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [MATLAB_批量修改文件名称](https://blog.csdn.net/qq_45908742/article/details/114907074)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值