[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
object order from makefile.am
From: |
D Haley |
Subject: |
object order from makefile.am |
Date: |
Sun, 18 Jul 2010 14:11:45 -0700 (PDT) |
Hello,
This might be a stupid question, but I have been looking around the docs for a
while, and no success.
I have got autotools working for my project under windows and mac, no problem;
however I am trying to use it under Msys on windows.
I have a problem where the following command wont work:
g++ -g -lfoo -lbar -o myfoo.exe myfoo.o
this fails with undefined references; however
g++ -g myfoo.o -lfoo -lbar -o myfoo.exe
works just fine.
My "solution" is currently to edit the Makefile after ./configure; I modify
myfoo_LINK = $(CXXLD) $(myfoo_CXXFLAGS) $(CXXFLAGS) \
$(quick3D_LDFLAGS) $(LDFLAGS) -o $@
to
myfoo_LINK = $(CXXLD) $(myfoo_OBJECTS) $(myfoo_CXXFLAGS) $(CXXFLAGS) \
$(quick3D_LDFLAGS) $(LDFLAGS) -o $@
and modify
myfoo$(EXEEXT): $(myfoo_OBJECTS) $(myfoo_DEPENDENCIES)
@rm -f myfoo$(EXEEXT)
$(myfoo_LINK) $(myfoo_OBJECTS) $(myfoo_LDADD) $(LIBS)
to
myfoo$(EXEEXT): $(myfoo_OBJECTS) $(myfoo_DEPENDENCIES)
@rm -f myfoo$(EXEEXT)
$(myfoo_LINK) $(myfoo_LDADD) $(LIBS)
However, I would like this to work straight away, and so any help that anyone
can provide would be most valuable!
- object order from makefile.am,
D Haley <=