我正在使用现有项目并将其更新为使用Clang。我安装了3.9版本,虽然我可以编译好,但我在链接时遇到错误。我正在使用LLVM提供的链接器并从Windows编译为ARM目标。
我得到的链接器错误是:符号不是DefinedRegular或Shared
我不确定出了什么问题,谷歌搜索似乎并没有产生很多结果。链接器不会告诉我哪个符号或类似的符号。因此错误信息非常模糊。
任何帮助都会很棒。谢谢!
编辑:
链接器命令:在它上面运行它会产生与通过makefile运行它相同的神秘错误
C:/LLVM/bin/ld.lld.exe --sysroot=../common/arm-sysroot/lts-12.04 C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_arm.o C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_armplatform.o C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_rtc.o C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/executive.o C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/executivemain.o C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/processregistry.o ../build/linux2-arm-release-obj/exec_client.o ../build/linux2-arm-release-obj/procstatus.o ../build/linux2-arm-release-obj/statusLogClient.o ../build/linux2-arm-release-obj/xmlLogClient.o ../build/linux2-arm-release-obj/statusLogBuf.o ../build/linux2-arm-release-obj/xmlLogBuf.o ../build/linux2-arm-release-obj/engLogBuf.o ../build/linux2-arm-release-obj/logBuf.o ../build/linux2-arm-release-obj/statusLogMsg.o ../build/linux2-arm-release-obj/xmlLogMsg.o ../build/linux2-arm-release-obj/engLogMsg.o ../build/linux2-arm-release-obj/logMsg.o ../build/linux2-arm-release-obj/statusLogFile.o ../build/linux2-arm-release-obj/xmlLogFile.o ../build/linux2-arm-release-obj/engLogFile.o ../build/linux2-arm-release-obj/engLogTable.o ../build/linux2-arm-release-obj/engLogEntry.o ../build/linux2-arm-release-obj/treatmentLogMsg.o ../build/linux2-arm-release-obj/treatmentHistoryMsg.o ../build/linux2-arm-release-obj/flowsheetMsg.o ../build/linux2-arm-release-obj/alertsAlarmsMsg.o ../build/linux2-arm-release-obj/logFile.o ../build/linux2-arm-release-obj/notifierSharedMemory.o -L../build/linux2-arm-release-obj -lutil -lplutodb -losi -lutil -lsyserror -lxml2 -lsqlite3 -lssl -lgcrypt -lcrypto -lpthread -lrt -luuid -L ../common/arm-sysroot/lts-12.04/lib/arm-linux-gnueabi -L ../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi -o ../build/linux2-arm-release-image/executive
symbol not DefinedRegular or Shared
这是通过makefile输出的链接器:
symbol not DefinedRegular or Shared
make: *** [executive] Error 1
以下是通过makefile输出的详细链接器:
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_arm.o
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_armplatform.o
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/exec_rtc.o
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/executive.o
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/executivemain.o
C:/Software/b2/D1_Common/software/application/base/executive/buildfiles/linux2-arm-release-obj/processregistry.o
../build/linux2-arm-release-obj/exec_client.o
../build/linux2-arm-release-obj/procstatus.o
../build/linux2-arm-release-obj/statusLogClient.o
../build/linux2-arm-release-obj/xmlLogClient.o
../build/linux2-arm-release-obj/statusLogBuf.o
../build/linux2-arm-release-obj/xmlLogBuf.o
../build/linux2-arm-release-obj/engLogBuf.o
../build/linux2-arm-release-obj/logBuf.o
../build/linux2-arm-release-obj/statusLogMsg.o
../build/linux2-arm-release-obj/xmlLogMsg.o
../build/linux2-arm-release-obj/engLogMsg.o
../build/linux2-arm-release-obj/logMsg.o
../build/linux2-arm-release-obj/statusLogFile.o
../build/linux2-arm-release-obj/xmlLogFile.o
../build/linux2-arm-release-obj/engLogFile.o
../build/linux2-arm-release-obj/engLogTable.o
../build/linux2-arm-release-obj/engLogEntry.o
../build/linux2-arm-release-obj/treatmentLogMsg.o
../build/linux2-arm-release-obj/treatmentHistoryMsg.o
../build/linux2-arm-release-obj/flowsheetMsg.o
../build/linux2-arm-release-obj/alertsAlarmsMsg.o
../build/linux2-arm-release-obj/logFile.o
../build/linux2-arm-release-obj/notifierSharedMemory.o
../build/linux2-arm-release-obj\libutil.a
../build/linux2-arm-release-obj\libplutodb.a
../build/linux2-arm-release-obj\libosi.a
../build/linux2-arm-release-obj\libutil.a
../build/linux2-arm-release-obj\libsyserror.a
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libxml2.so
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libsqlite3.so
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libssl.so
../common/arm-sysroot/lts-12.04/lib/arm-linux-gnueabi\libgcrypt.so
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libcrypto.so
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libpthread.so
../common/arm-sysroot/lts-12.04/lib/arm-linux-gnueabi/libpthread.so.0
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi/libpthread_nonshared.a
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\librt.so
../common/arm-sysroot/lts-12.04/usr/lib/arm-linux-gnueabi\libuuid.so
symbol not DefinedRegular or Shared
make: *** [executive] Error 1