Friday, 2 March 2018

compilation - c++ compiling problem

I'm trying to compile a c++ program, which is something I didn't do for a long time...



What I'm trying is:



g++ -c A.cpp  -o A.o

g++ -c dir/B.h -o B.o



which seem to work, and then I try:



g++ A.o B.o -o A -lX11 -lpthread


and get:





B.o: file not recognized: File format
not recognized



collect2: ld returned 1 exit status




What is the problem?



Thanks a lot :)

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...