stdcall
stdcall

Reputation: 28890

GCC, what does -W1 means

I have a legacy Makefile which is using the -W1 argument, I didn't find any reference to that, I thought it might be a typo, that the '1' is supposed to be 'l'. However, it works... So, can anyone explain why this line works ?

@$(CC) $(CFLAGS) -shared -W1,-soname,$(LIBNAME) -o $(OUTDIR)/$(LIBNAME) $(OBJS)

$(CC) is GCC, and the files compiled are C files. When I tried to compile CPP files using this command, only then I get

cc1plus: error: unrecognized command line option "-W1,-soname...

Upvotes: 4

Views: 5631

Answers (1)

Some programmer dude
Some programmer dude

Reputation: 409196

It looks like a typo, and that should be -Wl instead.

It's sometimes hard to differ between lower-case L (l) and the digit 1 in some fonts.

Upvotes: 3

Related Questions