hi.
i have written a program in c and also a makefile for it but i have a repetitive error:
/usr/bin/ld:4.txt: file format not recognized; treating as linker script
/usr/bin/ld:4.txt:1: syntax error

here is makefile code:

CC=gcc
test2 : test2.c 
        $(CC) test2.c 4.txt 5.txt 6.txt -I -lpthread -lrt -o test2

Recommended Answers

All 3 Replies

What are 4.txt, 5.txt, and 6.txt?

names of files that test2.c will use information inside of them and are beside of test2.c
i tested -I for showing this but didn't work.

If they're data files, why are you trying to compile them?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.