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

Lots of C errors #4

Open
ashokkushh opened this issue Aug 25, 2023 · 0 comments
Open

Lots of C errors #4

ashokkushh opened this issue Aug 25, 2023 · 0 comments

Comments

@ashokkushh
Copy link

On executing make file lot of redefinition of variables

gcc -ansi acotsp.o TSP.o utilities.o ants.o InOut.o timer.o parse.o ls.o -o acotsp -O -lm
/usr/bin/ld: TSP.o:(.bss+0x100): multiple definition of n'; acotsp.o:(.bss+0x8): first defined here /usr/bin/ld: TSP.o:(.bss+0xf8): multiple definition of distance'; acotsp.o:(.bss+0x0): first defined here
/usr/bin/ld: utilities.o:(.bss+0x0): multiple definition of distance'; acotsp.o:(.bss+0x0): first defined here /usr/bin/ld: utilities.o:(.bss+0x8): multiple definition of n'; acotsp.o:(.bss+0x8): first defined here
/usr/bin/ld: ants.o:(.bss+0xc8): multiple definition of n'; acotsp.o:(.bss+0x8): first defined here /usr/bin/ld: ants.o:(.bss+0xc0): multiple definition of distance'; acotsp.o:(.bss+0x0): first defined here
/usr/bin/ld: InOut.o:(.bss+0x160): multiple definition of n'; acotsp.o:(.bss+0x8): first defined here /usr/bin/ld: InOut.o:(.bss+0x158): multiple definition of distance'; acotsp.o:(.bss+0x0): first defined here
/usr/bin/ld: ls.o:(.bss+0x18): multiple definition of n'; acotsp.o:(.bss+0x8): first defined here /usr/bin/ld: ls.o:(.bss+0x10): multiple definition of distance'; acotsp.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:3: acotsp] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant