Link Problem
Qian Xu
quian.xu at stud.tu-ilmenau.de
Thu Apr 2 08:02:49 PDT 2009
Fawzi Mohamed wrote:
>
> simply put ld scans for symbols in libraries in the order they appear,
> if liba uases symbolsy from libb you should like them as -L-la -L-lb.
> Normally it is not difficult to achieve this, but as workaround you dan
> also tell the linker to recursively search also in the previous
> libraries, this slows the linking, but will allow any order in the
> libraries, even circular dependencies (that you would otherwise need to
> break liking libraries more than once).
>
> Simply pass --start-group *all the libs* --end-group to the linker
> (i.e. -L--start-group to the compiler)
> and (if your problem really came from this) it will go away
>
I tried the following command
"gdc -Wl,--start-group Foo.o Foo2.o Bar/Foo3.o Bar/Foo4.o -Wl,--end-group
-o main -Ltango/lib -lgtango"
But it still does not work. The same problem.
The following is a dump of the actual error message
----------------------
build_trunk_build_1926/build_componenttest.out-`.text._D5tango4util10collection4impl16AbstractIterator80__T16AbstractIteratorTC9timetable6common3src10controller6entity7Vehicle7VehicleZ16AbstractIterator9remainingMFZk'
referenced in section
`.text.__t24__D5tango4util10collection4impl16AbstractIterator80__T16AbstractIteratorTC9timetable6common3src10controller6entity7Vehicle7VehicleZ16AbstractIterator9remainingMFZk[__t24__D5tango4util10collection4impl16AbstractIterator80__T16AbstractIteratorTC9timetable6common3src10controller6entity7Vehicle7VehicleZ16AbstractIterator9remainingMFZk]'
of
build/boost/timetable/common/src/controller/importer/ImportVehicleController_1.o:
defined in discarded section
`.text._D5tango4util10collection4impl16AbstractIterator80__T16AbstractIteratorTC9timetable6common3src10controller6entity7Vehicle7VehicleZ16AbstractIterator9remainingMFZk[_D5tango4util10collection4impl16AbstractIterator80__T16AbstractIteratorTC9timetable6common3src10controller6entity7Vehicle7VehicleZ16AbstractIterator9remainingMFZk]'
of
build/boost/timetable/common/src/controller/importer/ImportVehicleController_1.o
build_trunk_build_1926/build_componenttest.out:collect2: ld returned 1 exit
status
----------------------
More information about the Digitalmars-d
mailing list