Closed lifeWithBug closed 2 years ago
这个情况你可以使用内置的clang命令,具体如下: clang++ GradeBook.cpp clang++ main.cpp clang++ GradeBook.o main.o ./a.out
On Thu, 23 Sep 2021 at 14:07, lifeWithBug @.***> wrote:
例如我在GradeBook.h中声明了GradeBook类的成员函数,在GradeBook.cpp中定义了Book类的成员函数,在main.cpp中(含main函数)运行时发生报错: /usr/bin/ld: /tmp/CCRGiKu0.0: in function 'main': main.cpp: (.text+0x413): undefined reference to 'GradeBook::GradeBook(std:: _cxx11: :basic_string<char, std:: char_traits, std: : allocator > const&, std: :array<int, 10ul> const&) collect2: error: ld returned 1 exit status
希望得到解决😁
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJE6T24D5Z52RZ6WWYDIHWDUDK73BANCNFSM5ES4X2DQ .
命令应该没问题,但是其实终端还有部分字符不会显示的bug。😂
发自我的iPad
在 2021年9月23日,下午2:11,Ken Chung @.***> 写道:
这个情况你可以使用内置的clang命令,具体如下: clang++ GradeBook.cpp clang++ main.cpp clang++ GradeBook.o main.o ./a.out
On Thu, 23 Sep 2021 at 14:07, lifeWithBug @.***> wrote:
例如我在GradeBook.h中声明了GradeBook类的成员函数,在GradeBook.cpp中定义了Book类的成员函数,在main.cpp中(含main函数)运行时发生报错: /usr/bin/ld: /tmp/CCRGiKu0.0: in function 'main': main.cpp: (.text+0x413): undefined reference to 'GradeBook::GradeBook(std:: _cxx11: :basic_string<char, std:: char_traits, std: : allocator > const&, std: :array<int, 10ul> const&) collect2: error: ld returned 1 exit status
希望得到解决😁
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJE6T24D5Z52RZ6WWYDIHWDUDK73BANCNFSM5ES4X2DQ .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
这个要到App Store更新 :)
On Thu, 23 Sep 2021 at 14:22, lifeWithBug @.***> wrote:
命令应该没问题,但是其实终端还有部分字符不会显示的bug。😂
发自我的iPad
在 2021年9月23日,下午2:11,Ken Chung @.***> 写道:
这个情况你可以使用内置的clang命令,具体如下: clang++ GradeBook.cpp clang++ main.cpp clang++ GradeBook.o main.o ./a.out
On Thu, 23 Sep 2021 at 14:07, lifeWithBug @.***> wrote:
例如我在GradeBook.h中声明了GradeBook类的成员函数,在GradeBook.cpp中定义了Book类的成员函数,在main.cpp中(含main函数)运行时发生报错:
/usr/bin/ld: /tmp/CCRGiKu0.0: in function 'main': main.cpp: (.text+0x413): undefined reference to 'GradeBook::GradeBook(std:: _cxx11: :basic_string<char, std:: char_traits, std: : allocator > const&, std: :array<int, 10ul> const&) collect2: error: ld returned 1 exit status
希望得到解决😁
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJE6T24D5Z52RZ6WWYDIHWDUDK73BANCNFSM5ES4X2DQ>
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248#issuecomment-925535351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJE6T25B3KIXR63UGJQ3DZDUDLBRTANCNFSM5ES4X2DQ .
好像还是不行。。。
发自我的iPad
在 2021年9月23日,下午2:23,Ken Chung @.***> 写道:
这个要到App Store更新 :)
On Thu, 23 Sep 2021 at 14:22, lifeWithBug @.***> wrote:
命令应该没问题,但是其实终端还有部分字符不会显示的bug。😂
发自我的iPad
在 2021年9月23日,下午2:11,Ken Chung @.***> 写道:
这个情况你可以使用内置的clang命令,具体如下: clang++ GradeBook.cpp clang++ main.cpp clang++ GradeBook.o main.o ./a.out
On Thu, 23 Sep 2021 at 14:07, lifeWithBug @.***> wrote:
例如我在GradeBook.h中声明了GradeBook类的成员函数,在GradeBook.cpp中定义了Book类的成员函数,在main.cpp中(含main函数)运行时发生报错:
/usr/bin/ld: /tmp/CCRGiKu0.0: in function 'main': main.cpp: (.text+0x413): undefined reference to 'GradeBook::GradeBook(std:: _cxx11: :basic_string<char, std:: char_traits, std: : allocator > const&, std: :array<int, 10ul> const&) collect2: error: ld returned 1 exit status
希望得到解决😁
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJE6T24D5Z52RZ6WWYDIHWDUDK73BANCNFSM5ES4X2DQ>
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/thebaselab/codeapp/issues/248#issuecomment-925535351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJE6T25B3KIXR63UGJQ3DZDUDLBRTANCNFSM5ES4X2DQ .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
可以留下截图吗?
很多命令行我都试过了
发自我的iPad
在 2021年9月23日,下午3:34,Ken Chung @.***> 写道:
可以留下截图吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
很多命令行我都试过了
发自我的iPad
在 2021年9月23日,下午3:34,Ken Chung @.***> 写道: 可以留下截图吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
之前我是用邮箱发的,不知道为什么没有图片显示。。。
Code App 的 C++ 暂不支持exception,请移除try、catch、throw等关键字。
使用clang++ GradeBook.cpp -fno-exceptions
编译代码。然后,您可以使用./a.out
运行程序。
例如我在GradeBook.h中声明了GradeBook类的成员函数,在GradeBook.cpp中定义了Book类的成员函数,在main.cpp中(含main函数)运行时发生报错: /usr/bin/ld: /tmp/CCRGiKu0.0: in function 'main': main.cpp: (.text+0x413): undefined reference to 'GradeBook::GradeBook(std:: _cxx11: :basic_string<char, std:: char_traits,
std: : allocator > const&, std: :array<int, 10ul> const&)
collect2: error: ld returned 1 exit status
希望得到解决😁