Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 0517d05

Browse files
committed
新增 CodeNothing v0.5.1 修复总结文档,详细记录了 macOS 动态库载入问题的修复、查找逻辑的简化及错误信息的改进,确保跨平台兼容性和向后兼容性。
1 parent 73abe7f commit 0517d05

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

file-doc/V0.5.1_SUMMARY.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# CodeNothing v0.5.1 修复总结
2+
3+
## 🎯 修复目标
4+
5+
修复 macOS 平台上动态库载入失败的问题,简化库文件查找逻辑。
6+
7+
## 🔧 修复内容
8+
9+
### 1. 平台支持修复
10+
-**Windows**: `{}.dll`
11+
-**macOS**: `{}.dylib` (修复前错误查找.so文件)
12+
-**Linux**: `{}.so`
13+
14+
### 2. 简化查找逻辑
15+
**查找目录(仅限两个)**
16+
1. 解释器目录/library/
17+
2. 当前目录/library/
18+
19+
**文件命名规范**
20+
- 无lib前缀
21+
- 平台特定扩展名
22+
23+
### 3. 错误信息改进
24+
```
25+
找不到库文件 'io'
26+
查找位置:
27+
- 解释器目录/library/
28+
- 当前目录/library/
29+
支持的文件格式: io.dylib, io.dll, io.dylib, io.so
30+
```
31+
32+
## 📋 使用方式
33+
34+
### 库文件放置
35+
```
36+
# 方式1:解释器目录
37+
CodeNothing.exe
38+
└── library/
39+
├── io.dll (Windows)
40+
├── io.dylib (macOS)
41+
└── io.so (Linux)
42+
43+
# 方式2:当前目录
44+
your_project/
45+
├── main.cn
46+
└── library/
47+
├── io.dll
48+
├── io.dylib
49+
└── io.so
50+
```
51+
52+
### 代码使用
53+
```codenothing
54+
using lib <io>; // 自动查找正确的平台文件
55+
```
56+
57+
## ✅ 修复验证
58+
59+
- ✅ 编译成功
60+
- ✅ 平台检测逻辑正确
61+
- ✅ 文件查找逻辑简化
62+
- ✅ 向后兼容性保持
63+
64+
## 📝 版本信息
65+
66+
**版本**: v0.5.1
67+
**发布**: 2025-07-28
68+
**类型**: 跨平台兼容性修复
69+
**影响**: 动态库载入功能
70+
71+
---
72+
73+
**修复原则**: 简单、明确、不让用户猜测!

0 commit comments

Comments
 (0)