I’m trying to compile a c file where I included a driver for Mongo database. I can compile it successfully from Cygwin but when I turn to Netbeans I get this. I should mention that this happened only after adding “-std=c99” in Additional options for C compiler.
UPDATE:
Successfully compiled it from Netbeans. But the “-std=c99” is driving me mad. If I have it it says (after every compilation if I don’t delete the obj files):
build/Debug/Cygwin_4.x-Windows/main.o.d:1: *** multiple target patterns. Stop.
UPDATE:
The content of main.o.d is:
build/Debug/Cygwin_4.x-Windows/main.o: main.c \
c:/mongodb-driver/src/mongo.h c:/mongodb-driver/src/bson.h \
c:/mongodb-driver/src/platform.h
c:/mongodb-driver/src/mongo.h:
c:/mongodb-driver/src/bson.h:
c:/mongodb-driver/src/platform.h:
Quoting from an existing answer since you might have the same issue
“I’ve seen this problem before using Cygwin–basically, make sees the : in the path and thinks it is another target definition, hence the error.
If you are working from a Cygwin installation, you might try replacing the c:/ with /cygdrive/c/. If not, you might try using relative paths or using a network mount and see if that fixes it”.
application fails with multiple targets from eclipse