Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal/ld: main(.text):*****: not defined error then link lib in windows #10128

Closed
Loafter opened this issue Mar 10, 2015 · 2 comments
Closed

Comments

@Loafter
Copy link

Loafter commented Mar 10, 2015

"main(.text):*****: not defined" error then link lib in windows

i use this config
go version go1.4.2 windows/amd64

GOROOT=c:\go

GOBIN=

GOARCH=amd64
GOOS=windows
GO_ENABLED=1
PATH=C:\mingw64\bin;%GOROOT%\bin;%PATH%;
LITEIDE_GDB=gdb64
LITEIDE_MAKE=mingw32-make
LITEIDE_TERM=%COMSPEC%
LITEIDE_TERMARGS=
LITEIDE_EXEC=%COMSPEC%
LITEIDE_EXECOPT=/C

the i try compile and use this cgo dirrective

// #cgo CPPFLAGS: -I"C:/GDCM/include/gdcm-2.4"
// #cgo LDFLAGS: -L"C:/GDCM/lib" -lgdcmgetopt -lgdcmcharls -lgdcmMSFF -lgdcmMEXD -lsocketxx -lgdcmMSFF -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmopenjpeg -lgdcmDICT -lgdcmIOD -lgdcmexpat -lgdcmDSED -lgdcmCommon -lgdcmzlib -lWs2_32
// #include "gdcmgobr.h"

i'v get this error:
.....
main(.text): _ZN4gdcm6System18GetLastSystemErrorEv: not defined
main(.text): _ZN4gdcm5Trace14GetDebugStreamEv: not defined
main(.text): undefined: ZN4gdcm25CompositeNetworkFunctions5CEchoEPKctS2_S2
main(.text): undefined: _ZNK4gdcm7DataSet8GetDEEndEv
.....
how to fix this??

@slimsag
Copy link

slimsag commented Mar 10, 2015

Probably related: #4069

@minux
Copy link
Member

minux commented Mar 10, 2015

fixing #4069 should fix this.

@minux minux closed this as completed Mar 10, 2015
@mikioh mikioh changed the title main(.text):*****: not defined error then link lib in windows cmd/internal/ld: main(.text):*****: not defined error then link lib in windows Mar 11, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants