Around emacs, linux, etc.
The order of GCC’s options DOES matter under windows.
The words followed is from http://mail.gnome.org/archives/gnomemm-list/2005-May/msg00009.html
> under Windows the order of compiler and linker flags matters.
> So it is important to do give the LDFLAGS after the source files:
> $(GCC) $(CFLAGS) -o $(BIN) $(SRC) $(LDFLAGS)
> and not
> $(GCC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC)
> So it is important to do give the LDFLAGS after the source files:
> $(GCC) $(CFLAGS) -o $(BIN) $(SRC) $(LDFLAGS)
> and not
> $(GCC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC)
In the GCC manual section 3, it’s said that:
You can mix options and other arguments. For the most part, the
order you use doesn’t matter. Order does matter when you use several
options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified.
order you use doesn’t matter. Order does matter when you use several
options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified.
Nothing is mentioned that it DOSE matter under windows! So if u get the same problem such as “library not found” or “some functions not implemented” under window, try to check the order of your compiling options. Anyway, try to learn and use automake.
| Print article | This entry was posted by Jay Xie on 2006/01/05 at 9:44 am, and is filed under GNU/Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
搜狐微博
新浪微博