Wednesday, September 18, 2024
HomeGolangNeed assistance with hyperlink library path - Getting Assist

Need assistance with hyperlink library path – Getting Assist


I’m attempting to construct an instance go-fltk program.
The linker is complaining it could possibly’t discover my GLU library. libGLU.so.1 is discovered on my machine at /usr/lib64/
I’ve tried working go construct -ldflags="-L /usr/lib64/" major.go with out success. Have I bought the format of the command incorrect?

Hello @shakeshuck,

A fast guess: Strive -L with out a area:

go construct -ldflags="-L/usr/lib64/" 

If this doesn’t assist, what’s the precise error message?

Morning, Christoph.

With out the area, it says:

flag offered however not outlined: -L/usr/lib64

With the area, the total error is:

/usr/lib64/go/1.22/pkg/software/linux_amd64/hyperlink: working g++ failed: exit standing 1
/usr/lib64/gcc/x86_64-suse-linux/13/…/…/…/…/x86_64-suse-linux/bin/ld: can not discover -lGLU: No such file or listing
collect2: error: ld returned 1 exit standing

Thanks for trying.

I doubt it’s associated to the trail.
You could have libGLU.so.1, however the linker will search for libGLU.so

On many linux distrubutions these are in several packages.
On my ubuntu 22.04, libGLU.so.1 is in libglu1-mesa
Whereas libGLU.so is in libglu1-mesa-dev.

The -dev package deal is required to construct something that hyperlinks to libGLU

Or, since libGLU.so is only a symlink to libGLU.so.1 you might also get away with creating that symlink

That’s it. You’ve cracked it.
The package deal I wanted on openSuse was glu-devel.

Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments