Code Monkey home page Code Monkey logo

Comments (7)

elvishp2006 avatar elvishp2006 commented on June 15, 2024 1

Hi @arunkhattri, I had the same problem, I resolved changing the build command on Makefile, as follow:

libswe.so: $(SWEOBJ)
	$(CC) -shared -o libswe.so $(SWEOBJ) -lm -ldl

I added the -lm -ldl

from swephgo.

mshafiee avatar mshafiee commented on June 15, 2024 1

Hi @arunkhattri, I had the same problem, I resolved changing the build command on Makefile, as follow:

libswe.so: $(SWEOBJ)
	$(CC) -shared -o libswe.so $(SWEOBJ) -lm -ldl

I added the -lm -ldl

Great! We look forward to reviewing your pull request.

from swephgo.

hiteshpariyani avatar hiteshpariyani commented on June 15, 2024

This helped, thanks.. After that, I had one more issue after running go run main.go

/tmp/go-build1130359442/b001/exe/main: error while loading shared libraries: libswe.so: cannot open shared object file: No such file or directory exit status 127

from swephgo.

elvishp2006 avatar elvishp2006 commented on June 15, 2024

@hiteshpariyani Hi, you should copy the compiled library to your ld library path, it might help you https://stackoverflow.com/questions/480764/linux-error-while-loading-shared-libraries-cannot-open-shared-object-file-no-s

from swephgo.

hiteshpariyani avatar hiteshpariyani commented on June 15, 2024

Thank you @elvishp2006 , that worked 🙏
Just a suggestion, add that in your PR of updating readme

from swephgo.

hiteshpariyani avatar hiteshpariyani commented on June 15, 2024

I am having trouble building it in WINDOWS, how do I do that?
It currently gives undefined: swephgo.UtcToJd

from swephgo.

manjunath-adisesha avatar manjunath-adisesha commented on June 15, 2024

Was trying to install swepgo on Raspberry PI and got bunch of collect2 errors. Tried passing -lm -ldl for ldflags. Looks like the go compiler ignores LDFLAG if it is already specified in the source. cgo_helpers.go the flag is set to #cgo LDFLAGS: -lswe. I locally modified the source to include -lm and -ldl flags #cgo LDFLAGS: -lm -ldl -lswe. This resolved the linking error during

from swephgo.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.