This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/36579] New: gcc refuses to recognize libraries on the command line


It seems to me that the ordering of the libraries / object files given on the
command line is significant.

This fails:
g++ -lpthread -L. -lext minimal.o  -o go
minimal.o: In function `main':
minimal.cpp:(.text+0x1f): undefined reference to `ext_'
collect2: ld returned 1 exit status

Whereas this succeeds:
g++ -lpthread minimal.o -L. -lmcf_ext -o go

here, libext.a is a c-library.


-- 
           Summary: gcc refuses to recognize libraries on the command line
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: c94wjpn at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36579


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]