我刚刚开始编程,并试图学习C.
对于我的作业,我必须设计一个程序,我很确定我的代码是正确的,但每当我尝试测试它,甚至直接从书中试用程序时,我都会收到这个错误.
Ld "/Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Products/Debug/Lab 2.app/Contents/MacOS/Lab 2" normal x86_64
cd "/Users/BasirJamil/Desktop/Lab 2"
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Products/Debug -F/Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Products/Debug -filelist "/Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Intermediates/Lab 2.build/Debug/Lab 2.build/Objects-normal/x86_64/Lab 2.LinkFileList" -mmacosx-version-min=10.7 -framework Cocoa -o "/Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Products/Debug/Lab 2.app/Contents/MacOS/Lab 2"
ld: duplicate symbol _main in /Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Intermediates/Lab 2.build/Debug/Lab 2.build/Objects-normal/x86_64/File.o and /Users/BasirJamil/Library/Developer/Xcode/DerivedData/Lab_2-fuyrgmtkjwgafzctwttcpwxptwox/Build/Intermediates/Lab 2.build/Debug/Lab 2.build/Objects-normal/x86_64/main.o for architecture x86_64
Command /Developer/usr/bin/clang failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
有人可以解释问题是什么,以及我如何解决它,而不过度技术(如果可能)?记住,我还是编程新手
提前致谢
所以我跳回去尝试学习编程。
我正在使用通过SSH的MBP来访问大学的linux计算机,并使用python和emacs进行编程。
每个文件都必须具有标题:
# File: file.py
# Author: My Name
# Date: 30 September 2014
# Section: 1
# Email: me@school.edu
# Description: sample header
Run Code Online (Sandbox Code Playgroud)
我的问题是:
有没有办法使该模板成为永久模板,以便每当我创建一个新文件时,这些注释就已经存在了?除文件日期和说明以外的所有内容都是静态的。如果有办法,是否还有办法自动填写更改file.py = whatINamedTheProgram.py和date = todaysDate的内容?