草庐IT

undefined-symbol

全部标签

macos - 戈朗 : dyld: Symbol not found: _SecCertificateCopyNormalizedSubjectContent

我正在通过运行此命令从OSX10.12Beta(16A312a)构建Golang1.7(goversiongo1.7darwin/amd64)应用程序envGOOS=darwinGOARCH=amd64/usr/local/go/bin/gobuild-ldflags=-s-odist/program${GOPATH}src/github.com/owner/repo/program.go该程序似乎在OSX10.7及更高版本上运行成功,但在10.6.8中中断并出现以下错误:dyld:找不到符号:_SecCertificateCopyNormalizedSubjectContent引用自

c - 为什么我用cgo的时候报错 "undefined reference to ` add2”

目录如下:-包括测试.h-liblibmytest.so-源代码测试.gotest.go代码如下:packagemain/*#cgoCFLAGS:-I../include#cgoLDFLAGS:-L../lib-lmytest#include"Test.h"*/import"C"funcmain(){C.add2(10,10)}当我使用gobuildtest.go时,控制台报告:#command-line-arguments/tmp/go-build168903458/command-line-arguments/_obj/test.cgo2.o:在函数_cgo_9efddd4c1a4

Go 为外部包导出常量报告 "undefined"

代码如下:packagemainimport("log""github.com/google/gopacket""github.com/google/gopacket/pcap")funcmain(){log.Print(gopacket.MaxEndpointSize)log.Print(pcap.MaxBpfInstructions)}当我运行gobuild时,我得到了这个:./main.go:11:undefined:pcap.MaxBpfInstructions但您可以在此处查看MaxBpfInstructions:https://godoc.org/github.com/go

戈朗 : command-line-arguments undefined: variable

我想在Golang中创建一个外部函数用于显示使用情况,但我不知道如何调用flag变量。这是我的实际代码:packagemainimport("flag""fmt""os")funcUsage(){ifArgSend{fmt.Printf("Usage:SEND")flag.PrintDefaults()os.Exit(0)}elseifArgTest{fmt.Printf("Usage:-test")flag.PrintDefaults()os.Exit(0)}elseifArgMacro{fmt.Printf("Usage:-macro")os.Exit(0)}else{fmt.Pr

go - undefined reference to error 仅针对某些函数

我有一个库和一个为它构建的C接口(interface)。我的程序使用versionString()编译得很好,但使用loadConfig()就不行。这怎么可能?walker.h:#ifndefWFE_C_H#defineWFE_C_H#ifdef__cplusplusextern"C"{#endifconstchar*versionString();void*loadConfig(constchar*filePath,char*errorMessageBuffer,intbufferLen);#ifdef__cplusplus}#endif#endif工作版本:packagemain/

go - 尝试在电子表格上执行 BatchUpdate 请求时获取 'Undefined: sheets.DeleteSheet'

我不太明白go的googlesheetsapi是如何工作的。我想要做的是从电子表格中删除位置0的工作表。这是目前无法正常工作的请求的代码片段。rb2:=&sheets.BatchUpdateSpreadsheetRequest{Requests:requests,}resp2,err:=srv.Spreadsheets.BatchUpdate(destinationSpreadsheetId,rb3).Do()我想我要做的是在上面第1行创建请求正文之前创建request。ds:=&sheets.DeleteSheetRequest{SheetId:int64(0),}deleteShe

amazon-web-services - goamz/sqs/md5.go :57: undefined: md5. 求和问题

我正在尝试在http://www.nitrous.io上操纵awssqs带有golang版本go1.1.1linux/amd64的盒子。当我从这个github存储库导入sqs模块时https://github.com/crowdmob/goamz/tree/master/sqs我用运行我的代码gorunmyCode.go我遇到这个问题:#github.com/crowdmob/goamz/sqs../src/github.com/crowdmob/goamz/sqs/md5.go:57:undefined:md5.Sum我对该模块的调用是这样的:import"github.com/cr

go - undefined <type float32 has no field or method sum> 错误。如何解决?

这是我的程序。当我运行它时,它给出了以下错误-a.sumundefined(typefloat32hasnofieldormethodsum)packagemainimport("fmt")typeCalculationinterface{operation(input[]float32)}typeAdditionstruct{sumfloat32}func(aAddition)operation(input[]float32){a.sum=input[0]for_,a:=rangeinput[1:]{a.sum+=a}fmt.Println("Sum:",a.sum)}funcmai

azure - 去 + azure : Calling a method return undefined

我正在尝试使用GoAzureSDK调用通知中心api我已经安装了SDK并导入到GO文件中:packagehubimport("fmt""github.com/Azure/azure-sdk-for-go/arm/notificationhubs")funcGetHub(){ifresourceType,err:=notificationhubs.Get("sourceGroupName","NameSpaceValue","NameOfTheHub");err!=nil{fmt.Println("Erroroccured")return}fmt.Println("Success")}然

c - "Undefined symbols for architecture x86_64:"用于在 macOS Sierra 上使用 cgo 的库

我正在尝试使用图书馆,https://github.com/go-steem/rpc,它使用了一些引用库的C代码。C库可以在这里找到,https://github.com/bitcoin-core/secp256k1我按照步骤安装了它$./autogen.sh$./configure$make$./tests$sudomakeinstall#optional并有这个输出;$sudomakeinstallPassword:CCsrc/libsecp256k1_la-secp256k1.loCCLDlibsecp256k1.laCCsrc/tests-tests.oCCLDtestsCCs