Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

简化编译命令 #7

Open
sky5454 opened this issue Jan 10, 2020 · 0 comments
Open

简化编译命令 #7

sky5454 opened this issue Jan 10, 2020 · 0 comments

Comments

@sky5454
Copy link

sky5454 commented Jan 10, 2020

新建文件命名为cbc写入以下内容,并添加可执行权限,再建立软链接到/usr/local/bin/cbc64即可

#!/bin/bash 
cbc -Wa,"--32" -Wl,"-melf_i386" $1  -L /usr/lib32

编译命令便可简化为
cbc64 test/hello.cb
等价于
cbc -Wa,"--32" -Wl,"-melf_i386" test/hello.cb -L /usr/lib32

脚本说明:-L参数是指定库所在位置,/usr/lib32是我所用系统Manjaro(ArchLinux系)32位库所在的路径

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant