[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ... linker problems
From: |
Antonio Coralles |
Subject: |
Re: ... linker problems |
Date: |
Mon, 24 Jan 2005 18:07:08 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041223) |
Ralf Wildenhues wrote:
* Antonio Coralles wrote on Sat, Jan 22, 2005 at 12:08:32AM CET:
[snip]
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld:
`.gnu.linkonce.t._ZN5boost9date_time23gregorian_calendar_baseINS0_19year_month_day_baseINS_9gregorian9greg_yearENS3_10greg_monthENS3_8greg_dayEEEmE16end_of_month_dayES4_S5_'
referenced in section `.rodata' of testUtils/testutils.o: defined in
discarded section
`.gnu.linkonce.t._ZN5boost9date_time23gregorian_calendar_baseINS0_19year_month_day_baseINS_9gregorian9greg_yearENS3_10greg_monthENS3_8greg_dayEEEmE16end_of_month_dayES4_S5_'
of testUtils/testutils.o
...
This messages don't appear with my normal makefiles ...
[snip]
Well this problem is allready solved. I can't tell what it was exactly,
but I still get this error when I try to mix object or *.a files
compiled with different flags. The problems I'm experiencing now are
explained in "strange problems".
Well. You don't tell us what you did before and what link command line
Automake issues. How are we to know the difference then?
Ok, here is my old link command line:
g++ -Wall -g `pkg-config gtkmm-2.4 --libs`
../../../objectFiles/messageMem.o -lsqlite -lboost_date_time
../../../objectFiles/worker.o ../../../objectFiles/schedule.o
../../../objectFiles/dataStorage.o ../../../objectFiles/timePeriod.o
../../../objectFiles/judge.o ../../../objectFiles/judgeRules.o
../../../objectFiles/overtimeExpert.o
../../../objectFiles/overtimeRules.o ../../../objectFiles/calendar.o
../../../objectFiles/organizer.o ../../../objectFiles/exceptionHelpers.o
../../../objectFiles/simpleUtils.o ../../../objectFiles/extendedUtils.o
../../../objectFiles/treaty.o ../../../objectFiles/poolLabour.o
../../../objectFiles/parsers.o ../../../objectFiles/coreUtilsPrivate.o
../../../objectFiles/dataWriters.o ../../../objectFiles/htmlExport.o
../../../objectFiles/misc.o ../../../objectFiles/mainWindow.o
../../../objectFiles/shiftTable.o ../../../objectFiles/shiftTableBox.o
../../../objectFiles/monthBox.o ../../../objectFiles/tableField.o
../../../objectFiles/textField.o ../../../objectFiles/coloredTextField.o
../../../objectFiles/workerScheduleField.o
../../../objectFiles/baseView.o ../../../objectFiles/shiftsView.o
../../../objectFiles/shiftsViewConnected.o
../../../objectFiles/attributeWindow.o
../../../objectFiles/shiftAttributeWindow.o
../../../objectFiles/shiftAttributeWindowConnected.o
../../../objectFiles/treatiesView.o
../../../objectFiles/treatiesViewConnected.o
../../../objectFiles/treatyAttributeMainWindow.o
../../../objectFiles/treatyOvertimeWindow.o
../../../objectFiles/treatyOvertimeWindowConnected.o
../../../objectFiles/treatyRulesWindow.o
../../../objectFiles/treatyRulesWindowConnected.o
../../../objectFiles/needsWindow.o ../../../objectFiles/workersView.o
../../../objectFiles/workersViewConnected.o
../../../objectFiles/workerAttributeWindow.o
../../../objectFiles/invalidCharacters.o
../../../objectFiles/shiftPrefWindow.o
../../../objectFiles/weekdayPrefWindow.o
../../../objectFiles/statFields.o ../../../objectFiles/dateFields.o
../../../objectFiles/poolScheduleField.o ../../../objectFiles/main.o -o
mainTest; \
And here the new one:
g++ -g -Wall -o dpm dpm-main.o interface/mainWindow/lib_mainwindow.a
interface/listView/lib_listview.a
interface/attributeWindow/lib_attributewindow.a
interface/shiftTable/lib_shifttable.a interface/misc/lib_misc.a
htmlExport/lib_htmlexport.a messageMem/lib_messagemem.a
dataStorage/lib_datastorage.a utility/lib_utils.a
organizer/lib_organizer.a manpower/lib_manpower.a
labourLaw/lib_labourlaw.a schedule/lib_schedule.a
helperFunctions/lib_helperfunctions.a shared/lib_shared.a
-Wl,--export-dynamic -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-x11-2.0
-lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -L/usr/lib
-lboost_date_time-mt-d -lsqlite
As one may notice: I switched from -lboost_date_time to
-lboost_date_time_mt-d, but it didn't work without the "_mt-d" either.
I've also partly reorganized my code, but only after experiencing
problems, because I thought that may help. The various *.a files are
created like this:
make[2]: Entering directory `/home/antonio/coding/dpm/10/src/shared'
source='timePeriod.cc' object='timePeriod.o' libtool=no \
depfile='.deps/timePeriod.Po' tmpdepfile='.deps/timePeriod.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"dpm\"
-DVERSION=\"0.0.42\" -I. -I. -Wall -g -c -o timePeriod.o `test -f
timePeriod.cc || echo './'`timePeriod.cc
source='calendar.cc' object='calendar.o' libtool=no \
depfile='.deps/calendar.Po' tmpdepfile='.deps/calendar.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"dpm\"
-DVERSION=\"0.0.42\" -I. -I. -Wall -g -c -o calendar.o `test -f
calendar.cc || echo './'`calendar.cc
source='simpleUtils.cc' object='simpleUtils.o' libtool=no \
depfile='.deps/simpleUtils.Po' tmpdepfile='.deps/simpleUtils.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"dpm\"
-DVERSION=\"0.0.42\" -I. -I. -Wall -g -c -o simpleUtils.o `test -f
simpleUtils.cc || echo './'`simpleUtils.cc
rm -f lib_shared.a
ar cru lib_shared.a timePeriod.o calendar.o simpleUtils.o
ranlib lib_shared.a
make[2]: Leaving directory `/home/antonio/coding/dpm/10/src/shared'
Please don't start a new thread if you are still trying to solve the
same problem:
Well, my problems have changed ....
* Antonio Coralles wrote on Mon, Jan 24, 2005 at 05:12:30PM CET:
May there be a differnece between ranlib and i686-pc-linux-gnu-ranlib
and/or ar and i686-pc-linux-gnu-ar ?
That depends quite on what particular system you are on. If that
matches i686-pc-linux-gnu, there should be little difference.
But you did not tell us that either.
Yes, it matches i686-pc-linux-gnu.
and if yes, how can i force
automake/autoconf to choose a particular - or better - in any case the
correct version ?
Use --host=i686-pc-linux-gnu. But I don't think you need this.
Regards,
Ralf
I hope that made things clearer ...
Regards,
antonio