首页 > 解决方案 > 编译器错误链接对象以在 Visual Studio 中进行远程编译

问题描述

目前我运行一个 freenas 监狱,所以我可以编译我的 c 代码,它使用一些 POSIX 函数。监狱很新鲜,我所做的只是启用 SSH 和“pkg install gcc”。但是我收到以下错误:

1>Starting remote build
1>Compiling sources:
1>main.c
1>cc1 : warning : command line option '-fthreadsafe-statics' is valid for C++/ObjC++ but not for C
1>cc1 : warning : command line option '-frtti' is valid for C++/ObjC++ but not for C
1>Linking objects
1>/usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd11.1/6.4.0/../../../libstdc++.so : error : undefined reference to `__cxa_thread_atexit_impl@FBSD_1.5'
1>collect2 : error : ld returned 1 exit status
1>Done building project "testingdesktop.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我不知道发生了什么,有些东西不见了,但我不知道为什么。

标签: cvisual-studiocompiler-errors

解决方案


推荐阅读