Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Compilation 32bit on 64bit plateform (advenced)
icon4.gif  Compilation 32bit on 64bit plateform (advenced) [message #895563] Fri, 13 July 2012 15:02 Go to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
Hi,

I ve already read the other topics that talk about this subject but it does not help me..

My problem : i can't compile my program for 32bit on a debian which is 64bit
I am using Eclipse c++ btw

I saw Axel Mueller say :
To build 32Bit applications on a 64Bit platform you need:
- gcc/g++ with multilib
- ia32-libs (needed to link and run your application)
- in Eclipse you add -m32 to the compiler and linker flags

I did not have g++-multilib so I installed it by apt-get install g++-multilib. But i dont know if eclipse use the new or the older g++.
I hadnt got ia32-libs either so I did apt-get ia32-libs too.
But i dont know how to use it..

And Ive read on the internet that the option -m32 in project/properties/c/c++build/settings/GCC C++ Compiler/Command should work

But even though I tried it, I cannot make it work.

Any help would be appreciated

Thanks.
Re: Compilation 32bit on 64bit plateform (advenced) [message #895808 is a reply to message #895563] Mon, 16 July 2012 07:20 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
I did not have g++-multilib so I installed it by apt-get install g++-multilib. But i dont know if eclipse use the new or the older g++.

There is still only one g++ binary. The only difference is that g++ from the g++-multilib can compile for 32 and 64 bit.

Quote:
I hadnt got ia32-libs either so I did apt-get ia32-libs too.
But i dont know how to use it..

You don't have to do anything. The linker and your 32bit application will use the correct libs.

Quote:
But even though I tried it, I cannot make it work.

Can you be more specific. What does not work? Any error messages?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compilation 32bit on 64bit plateform (advenced) [message #895826 is a reply to message #895808] Mon, 16 July 2012 08:31 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
Thanks for ur answer

First, I dont understand how the lib ia32 will be linked to my application if i dont add it in project properties/c++ linker/librairies..

Second, i am working on Debian 64 bit and using the graphic librairy "Foxtool kit" so I install it like this (./configure make make install) but it is compiled for 64bit system so when I compile my application that needs Fox lib (g++ -m32 -L/root/Documents/lib/64bit -o"testfox" ./NotreWindow.o ./main.o -lFOX-1.6) the error message is :

/usr/bin/ld: skipping incompatible /root/Documents/lib/64bit/libFOX-1.6.so when searching for -lFOX-1.6
/usr/bin/ld: skipping incompatible /root/Documents/lib/64bit/libFOX-1.6.a when searching for -lFOX-1.6
/usr/bin/ld: skipping incompatible /usr/local/lib/libFOX-1.6.so when searching for -lFOX-1.6
/usr/bin/ld: skipping incompatible /usr/local/lib/libFOX-1.6.a when searching for -lFOX-1.6
/usr/bin/ld: cannot find -lFOX-1.6

I have compiled Fox in Debian 32bit as well and I import it in my Debian 64bit and I try this :
g++ -m32 -L/root/Documents/lib/32bit -o"testfox" ./NotreWindow.o ./main.o -lFOX-1.6
The error message is :
/root/Documents/lib/32bit/idth(wchar_t) const':
FXFont.cpp:(.text+0x1clibFOX-1.6.a(FXFont.o): In function `FX::FXFont::getCharWf6): undefined reference to `XftTextExtents32'
(999999 errors like that)
The compiler does not recognize anything in the lib..
I dont know how to do it.
Re: Compilation 32bit on 64bit plateform (advenced) [message #895876 is a reply to message #895826] Mon, 16 July 2012 12:16 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Firstly, you have to compile Foxtool kit library as 32bit version on your 64bit host. Have a look at the configure options to see how you can pass gcc compiler flags http://stackoverflow.com/questions/3261909/build-32bit-on-64-bit-linux-using-a-configure-script


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compilation 32bit on 64bit plateform (advenced) [message #895932 is a reply to message #895876] Mon, 16 July 2012 14:34 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
When I compile FOX (64 bit standard) it works, I can create an application that uses FOX, perfect.

But, when I add -m32 to complile FOX, the error message appears :
skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLU.so when searching for -lGLU

I know FOX uses GLU library and i have it in my system but in 64bit version!

It is always the same problem :
I tried to compile my application in 32bit, but I could not because I have FOX in 64bit.
And now I am trying to compile FOX in 32bit, but I cannot because I have GLU in 64bit..
Endless problems..

How I can do it please? There must be a solution.
Re: Compilation 32bit on 64bit plateform (advenced) [message #896114 is a reply to message #895932] Tue, 17 July 2012 09:55 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
I have figured out how it works so when i compile FOX in 64bit it works.
But when i want to compile in 32bit the error message appears :
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.a when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.a when searching for -lXft
/usr/bin/ld: cannot find -lXft

I dont understand why, because in FOX properties/C++build/settings/C++linker/libraries/ I change the path to : /usr/lib32/ (libs given by package ia32-libs)

root@solinnen:~# ls /usr/lib32/libXft.so.2
/usr/lib32/libXft.so.2

I dont understand why it tries to link libXft from /usr/lib/libXft.so !

Someone has an idea?
Re: Compilation 32bit on 64bit plateform (advenced) [message #896115 is a reply to message #895932] Tue, 17 July 2012 10:01 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Gary All wrote on Mon, 16 July 2012 16:34
When I compile FOX (64 bit standard) it works, I can create an application that uses FOX, perfect.

But, when I add -m32 to complile FOX, the error message appears :
skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLU.so when searching for -lGLU

It seems you did not pass "-m32" to the linker. Did you use the configure command line I quoted in my last post? Did you clean up before calling configure?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compilation 32bit on 64bit plateform (advenced) [message #896119 is a reply to message #896115] Tue, 17 July 2012 10:26 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
make all 
Building target: libFOX.so
Invoking: GCC C++ Linker
g++ -m32 -L/usr/lib32 -shared -o"libFOX.so"  ./FX4Splitter.o ./FX7Segment.o ./FX885910Codec.o ./FX885911Codec.o ./FX885913Codec.o ./FX885914Codec.o ./FX885915Codec.o ./FX885916Codec.o ./FX88591Codec.o ./FX88592Codec.o ./FX88593Codec.o ./FX88594Codec.o ./FX88595Codec.o ./FX88596Codec.o ./FX88597Codec.o ./FX88598Codec.o ./FX88599Codec.o ./FXAccelTable.o ./FXApp.o ./FXArrowButton.o ./FXBMPIcon.o ./FXBMPImage.o ./FXBZFileStream.o ./FXBitmap.o ./FXBitmapFrame.o ./FXBitmapView.o ./FXButton.o ./FXCP1250Codec.o ./FXCP1251Codec.o ./FXCP1252Codec.o ./FXCP1253Codec.o ./FXCP1254Codec.o ./FXCP1255Codec.o ./FXCP1256Codec.o ./FXCP1257Codec.o ./FXCP1258Codec.o ./FXCP437Codec.o ./FXCP850Codec.o ./FXCP852Codec.o ./FXCP855Codec.o ./FXCP856Codec.o ./FXCP857Codec.o ./FXCP860Codec.o ./FXCP861Codec.o ./FXCP862Codec.o ./FXCP863Codec.o ./FXCP864Codec.o ./FXCP865Codec.o ./FXCP866Codec.o ./FXCP869Codec.o ./FXCP874Codec.o ./FXCURCursor.o ./FXCanvas.o ./FXCheckButton.o ./FXChoiceBox.o ./FXColorBar.o ./FXColorDialog.o ./FXColorList.o ./FXColorNames.o ./FXColorRing.o ./FXColorSelector.o ./FXColorWell.o ./FXColorWheel.o ./FXComboBox.o ./FXComposeContext.o ./FXComposite.o ./FXCursor.o ./FXDC.o ./FXDCPrint.o ./FXDCWindow.o ./FXDLL.o ./FXDataTarget.o ./FXDate.o ./FXDebugTarget.o ./FXDelegator.o ./FXDial.o ./FXDialogBox.o ./FXDict.o ./FXDir.o ./FXDirBox.o ./FXDirDialog.o ./FXDirList.o ./FXDirSelector.o ./FXDockBar.o ./FXDockHandler.o ./FXDockSite.o ./FXDockTitle.o ./FXDocument.o ./FXDragCorner.o ./FXDrawable.o ./FXDriveBox.o ./FXException.o ./FXExpression.o ./FXExtentd.o ./FXExtentf.o ./FXFile.o ./FXFileDialog.o ./FXFileDict.o ./FXFileList.o ./FXFileSelector.o ./FXFileStream.o ./FXFoldingList.o ./FXFont.o ./FXFontDialog.o ./FXFontSelector.o ./FXFrame.o ./FXGIFCursor.o ./FXGIFIcon.o ./FXGIFImage.o ./FXGLCanvas.o ./FXGLCone.o ./FXGLContext.o ./FXGLCube.o ./FXGLCylinder.o ./FXGLObject.o ./FXGLShape.o ./FXGLSphere.o ./FXGLTriangleMesh.o ./FXGLViewer.o ./FXGLVisual.o ./FXGUISignal.o ./FXGZFileStream.o ./FXGradientBar.o ./FXGroupBox.o ./FXHash.o ./FXHeader.o ./FXHorizontalFrame.o ./FXICOIcon.o ./FXICOImage.o ./FXIFFIcon.o ./FXIFFImage.o ./FXIO.o ./FXIcon.o ./FXIconDict.o ./FXIconList.o ./FXIconSource.o ./FXId.o ./FXImage.o ./FXImageFrame.o ./FXImageView.o ./FXInputDialog.o ./FXJPGIcon.o ./FXJPGImage.o ./FXKOI8RCodec.o ./FXKnob.o ./FXLabel.o ./FXList.o ./FXListBox.o ./FXMDIButton.o ./FXMDIChild.o ./FXMDIClient.o ./FXMainWindow.o ./FXMat3d.o ./FXMat3f.o ./FXMat4d.o ./FXMat4f.o ./FXMatrix.o ./FXMemMap.o ./FXMemoryStream.o ./FXMenuBar.o ./FXMenuButton.o ./FXMenuCaption.o ./FXMenuCascade.o ./FXMenuCheck.o ./FXMenuCommand.o ./FXMenuPane.o ./FXMenuRadio.o ./FXMenuSeparator.o ./FXMenuTitle.o ./FXMessageBox.o ./FXObject.o ./FXObjectList.o ./FXOptionMenu.o ./FXPCXIcon.o ./FXPCXImage.o ./FXPNGIcon.o ./FXPNGImage.o ./FXPPMIcon.o ./FXPPMImage.o ./FXPacker.o ./FXPath.o ./FXPicker.o ./FXPipe.o ./FXPoint.o ./FXPopup.o ./FXPrintDialog.o ./FXProgressBar.o ./FXProgressDialog.o ./FXQuatd.o ./FXQuatf.o ./FXRASIcon.o ./FXRASImage.o ./FXRGBIcon.o ./FXRGBImage.o ./FXRadioButton.o ./FXRanged.o ./FXRangef.o ./FXRealSlider.o ./FXRealSpinner.o ./FXRecentFiles.o ./FXRectangle.o ./FXRegion.o ./FXRegistry.o ./FXReplaceDialog.o ./FXRex.o ./FXRootWindow.o ./FXRuler.o ./FXRulerView.o ./FXScrollArea.o ./FXScrollBar.o ./FXScrollPane.o ./FXScrollWindow.o ./FXSearchDialog.o ./FXSeparator.o ./FXSettings.o ./FXShell.o ./FXShutter.o ./FXSize.o ./FXSlider.o ./FXSocket.o ./FXSphered.o ./FXSpheref.o ./FXSpinner.o ./FXSplashWindow.o ./FXSplitter.o ./FXSpring.o ./FXStat.o ./FXStatusBar.o ./FXStatusLine.o ./FXStream.o ./FXString.o ./FXStringDict.o ./FXSwitcher.o ./FXSystem.o ./FXTGAIcon.o ./FXTGAImage.o ./FXTIFIcon.o ./FXTIFImage.o ./FXTabBar.o ./FXTabBook.o ./FXTabItem.o ./FXTable.o ./FXText.o ./FXTextCodec.o ./FXTextField.o ./FXThread.o ./FXToggleButton.o ./FXToolBar.o ./FXToolBarGrip.o ./FXToolBarShell.o ./FXToolBarTab.o ./FXToolTip.o ./FXTopWindow.o ./FXTranslator.o ./FXTreeList.o ./FXTreeListBox.o ./FXTriStateButton.o ./FXURL.o ./FXUTF16Codec.o ./FXUTF32Codec.o ./FXUTF8Codec.o ./FXUndoList.o ./FXVec2d.o ./FXVec2f.o ./FXVec3d.o ./FXVec3f.o ./FXVec4d.o ./FXVec4f.o ./FXVerticalFrame.o ./FXVisual.o ./FXWindow.o ./FXWizard.o ./FXXBMIcon.o ./FXXBMImage.o ./FXXPMIcon.o ./FXXPMImage.o ./fxascii.o ./fxbmpio.o ./fxezquantize.o ./fxfilematch.o ./fxfsquantize.o ./fxgifio.o ./fxicoio.o ./fxiffio.o ./fxjpegio.o ./fxkeyboard.o ./fxkeysym.o ./fxparsegeometry.o ./fxpcxio.o ./fxpngio.o ./fxppmio.o ./fxpriv.o ./fxpsio.o ./fxrasio.o ./fxrgbio.o ./fxtargaio.o ./fxtifio.o ./fxunicode.o ./fxutils.o ./fxwuquantize.o ./fxxbmio.o ./fxxpmio.o ./icons.o ./strtoll.o ./vsscanf.o   -lX11 -lXft -lpng -lGL -lGLU -lXrender -lXext -lrt -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.a when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.a when searching for -lXft
/usr/bin/ld: cannot find -lXft
collect2: ld returned 1 exit status
make: *** [libFOX.so] Erreur 1


I passed the option -m32 to the compilater and linker.
The stronger is that if i delete Xft in in FOX properties/C++build/settings/C++linker/libraries/, FOX is compiled. But in xterm:
g++-4.4 -m32 *.cpp -I /usr/local/include/fox-1.6/ -L ../FOX/Debug/ -lFOX
../FOX/Debug//libFOX.so: undefined reference to `FcFontSetDestroy'
../FOX/Debug//libFOX.so: undefined reference to `FcPatternAddString'
../FOX/Debug//libFOX.so: undefined reference to `XftInit'
../FOX/Debug//libFOX.so: undefined reference to `XftCharExists'
...

And
g++-4.4 -m32 *.cpp -I /usr/local/include/fox-1.6/ -L ../FOX/Debug/ -lFOX -L/usr/lib32/ -lXft
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.a when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.so when searching for -lXft
/usr/bin/ld: skipping incompatible /usr/lib/libXft.a when searching for -lXft
/usr/bin/ld: cannot find -lXft
collect2: ld returned 1 exit status


I have just tried to compile FOX in 64bit with path libraries like /usr/lib32/:
make all 
Building target: libFOX.so
Invoking: GCC C++ Linker
g++ -L/usr/lib32 -shared -o"libFOX.so"  ./FX4Splitter.o ./FX7Segment.o ./FX885910Codec.o ./FX885911Codec.o ./FX885913Codec.o ./FX885914Codec.o ./FX885915Codec.o ./FX885916Codec.o ./FX88591Codec.o ./FX88592Codec.o ./FX88593Codec.o ./FX88594Codec.o ./FX88595Codec.o ./FX88596Codec.o ./FX88597Codec.o ./FX88598Codec.o ./FX88599Codec.o ./FXAccelTable.o ./FXApp.o ./FXArrowButton.o ./FXBMPIcon.o ./FXBMPImage.o ./FXBZFileStream.o ./FXBitmap.o ./FXBitmapFrame.o ./FXBitmapView.o ./FXButton.o ./FXCP1250Codec.o ./FXCP1251Codec.o ./FXCP1252Codec.o ./FXCP1253Codec.o ./FXCP1254Codec.o ./FXCP1255Codec.o ./FXCP1256Codec.o ./FXCP1257Codec.o ./FXCP1258Codec.o ./FXCP437Codec.o ./FXCP850Codec.o ./FXCP852Codec.o ./FXCP855Codec.o ./FXCP856Codec.o ./FXCP857Codec.o ./FXCP860Codec.o ./FXCP861Codec.o ./FXCP862Codec.o ./FXCP863Codec.o ./FXCP864Codec.o ./FXCP865Codec.o ./FXCP866Codec.o ./FXCP869Codec.o ./FXCP874Codec.o ./FXCURCursor.o ./FXCanvas.o ./FXCheckButton.o ./FXChoiceBox.o ./FXColorBar.o ./FXColorDialog.o ./FXColorList.o ./FXColorNames.o ./FXColorRing.o ./FXColorSelector.o ./FXColorWell.o ./FXColorWheel.o ./FXComboBox.o ./FXComposeContext.o ./FXComposite.o ./FXCursor.o ./FXDC.o ./FXDCPrint.o ./FXDCWindow.o ./FXDLL.o ./FXDataTarget.o ./FXDate.o ./FXDebugTarget.o ./FXDelegator.o ./FXDial.o ./FXDialogBox.o ./FXDict.o ./FXDir.o ./FXDirBox.o ./FXDirDialog.o ./FXDirList.o ./FXDirSelector.o ./FXDockBar.o ./FXDockHandler.o ./FXDockSite.o ./FXDockTitle.o ./FXDocument.o ./FXDragCorner.o ./FXDrawable.o ./FXDriveBox.o ./FXException.o ./FXExpression.o ./FXExtentd.o ./FXExtentf.o ./FXFile.o ./FXFileDialog.o ./FXFileDict.o ./FXFileList.o ./FXFileSelector.o ./FXFileStream.o ./FXFoldingList.o ./FXFont.o ./FXFontDialog.o ./FXFontSelector.o ./FXFrame.o ./FXGIFCursor.o ./FXGIFIcon.o ./FXGIFImage.o ./FXGLCanvas.o ./FXGLCone.o ./FXGLContext.o ./FXGLCube.o ./FXGLCylinder.o ./FXGLObject.o ./FXGLShape.o ./FXGLSphere.o ./FXGLTriangleMesh.o ./FXGLViewer.o ./FXGLVisual.o ./FXGUISignal.o ./FXGZFileStream.o ./FXGradientBar.o ./FXGroupBox.o ./FXHash.o ./FXHeader.o ./FXHorizontalFrame.o ./FXICOIcon.o ./FXICOImage.o ./FXIFFIcon.o ./FXIFFImage.o ./FXIO.o ./FXIcon.o ./FXIconDict.o ./FXIconList.o ./FXIconSource.o ./FXId.o ./FXImage.o ./FXImageFrame.o ./FXImageView.o ./FXInputDialog.o ./FXJPGIcon.o ./FXJPGImage.o ./FXKOI8RCodec.o ./FXKnob.o ./FXLabel.o ./FXList.o ./FXListBox.o ./FXMDIButton.o ./FXMDIChild.o ./FXMDIClient.o ./FXMainWindow.o ./FXMat3d.o ./FXMat3f.o ./FXMat4d.o ./FXMat4f.o ./FXMatrix.o ./FXMemMap.o ./FXMemoryStream.o ./FXMenuBar.o ./FXMenuButton.o ./FXMenuCaption.o ./FXMenuCascade.o ./FXMenuCheck.o ./FXMenuCommand.o ./FXMenuPane.o ./FXMenuRadio.o ./FXMenuSeparator.o ./FXMenuTitle.o ./FXMessageBox.o ./FXObject.o ./FXObjectList.o ./FXOptionMenu.o ./FXPCXIcon.o ./FXPCXImage.o ./FXPNGIcon.o ./FXPNGImage.o ./FXPPMIcon.o ./FXPPMImage.o ./FXPacker.o ./FXPath.o ./FXPicker.o ./FXPipe.o ./FXPoint.o ./FXPopup.o ./FXPrintDialog.o ./FXProgressBar.o ./FXProgressDialog.o ./FXQuatd.o ./FXQuatf.o ./FXRASIcon.o ./FXRASImage.o ./FXRGBIcon.o ./FXRGBImage.o ./FXRadioButton.o ./FXRanged.o ./FXRangef.o ./FXRealSlider.o ./FXRealSpinner.o ./FXRecentFiles.o ./FXRectangle.o ./FXRegion.o ./FXRegistry.o ./FXReplaceDialog.o ./FXRex.o ./FXRootWindow.o ./FXRuler.o ./FXRulerView.o ./FXScrollArea.o ./FXScrollBar.o ./FXScrollPane.o ./FXScrollWindow.o ./FXSearchDialog.o ./FXSeparator.o ./FXSettings.o ./FXShell.o ./FXShutter.o ./FXSize.o ./FXSlider.o ./FXSocket.o ./FXSphered.o ./FXSpheref.o ./FXSpinner.o ./FXSplashWindow.o ./FXSplitter.o ./FXSpring.o ./FXStat.o ./FXStatusBar.o ./FXStatusLine.o ./FXStream.o ./FXString.o ./FXStringDict.o ./FXSwitcher.o ./FXSystem.o ./FXTGAIcon.o ./FXTGAImage.o ./FXTIFIcon.o ./FXTIFImage.o ./FXTabBar.o ./FXTabBook.o ./FXTabItem.o ./FXTable.o ./FXText.o ./FXTextCodec.o ./FXTextField.o ./FXThread.o ./FXToggleButton.o ./FXToolBar.o ./FXToolBarGrip.o ./FXToolBarShell.o ./FXToolBarTab.o ./FXToolTip.o ./FXTopWindow.o ./FXTranslator.o ./FXTreeList.o ./FXTreeListBox.o ./FXTriStateButton.o ./FXURL.o ./FXUTF16Codec.o ./FXUTF32Codec.o ./FXUTF8Codec.o ./FXUndoList.o ./FXVec2d.o ./FXVec2f.o ./FXVec3d.o ./FXVec3f.o ./FXVec4d.o ./FXVec4f.o ./FXVerticalFrame.o ./FXVisual.o ./FXWindow.o ./FXWizard.o ./FXXBMIcon.o ./FXXBMImage.o ./FXXPMIcon.o ./FXXPMImage.o ./fxascii.o ./fxbmpio.o ./fxezquantize.o ./fxfilematch.o ./fxfsquantize.o ./fxgifio.o ./fxicoio.o ./fxiffio.o ./fxjpegio.o ./fxkeyboard.o ./fxkeysym.o ./fxparsegeometry.o ./fxpcxio.o ./fxpngio.o ./fxppmio.o ./fxpriv.o ./fxpsio.o ./fxrasio.o ./fxrgbio.o ./fxtargaio.o ./fxtifio.o ./fxunicode.o ./fxutils.o ./fxwuquantize.o ./fxxbmio.o ./fxxpmio.o ./icons.o ./strtoll.o ./vsscanf.o   -lX11 -lXft -lpng -lGL -lGLU -lXrender -lXext -lrt -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib32/libX11.a when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib32/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib32/libpng.a when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib32/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib32/libGLU.so when searching for -lGLU
/usr/bin/ld: skipping incompatible /usr/lib32/libGLU.a when searching for -lGLU
Finished building target: libFOX.so
/usr/bin/ld: skipping incompatible /usr/lib32/libXrender.so when searching for -lXrender
/usr/bin/ld: skipping incompatible /usr/lib32/libXrender.a when searching for -lXrender
 
/usr/bin/ld: skipping incompatible /usr/lib32/libXext.so when searching for -lXext
/usr/bin/ld: skipping incompatible /usr/lib32/libXext.a when searching for -lXext
/usr/bin/ld: skipping incompatible /usr/lib32/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib32/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc

Logic errors! It is trying to link 32bits libraries to FOX which has just been compiled in 64bit.
But why does not it respect this path when i try to compile FOX in 32bit.

I dont understand anything anymore.. ldconfig problem?

[Updated on: Tue, 17 July 2012 11:05]

Report message to a moderator

Re: Compilation 32bit on 64bit plateform (advenced) [message #896174 is a reply to message #896119] Tue, 17 July 2012 13:46 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
It works when i compile in the term :
root@solinnen:~/Documents/testfox# g++-4.4 -m32 *.cpp -I /usr/local/include/fox-1.6/ -L ../FOX/Debug/ -lFOX -L /usr/lib32/ /usr/lib32/libXft.so.2


But i do not understand, if someone can explain to me?
Now how can i do this compilation in Eclipse?

[Updated on: Tue, 17 July 2012 13:47]

Report message to a moderator

Re: Compilation 32bit on 64bit plateform (advenced) [message #896367 is a reply to message #896174] Wed, 18 July 2012 08:13 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libXft.so when searching for -lXft

That's weird. It should search in /usr/lib/gcc/i686-linux-gnu/4.4.5/../../../
Did you call "make clean" after adding the "-m32" option? Perhaps there are some leftovers.

Gary All wrote on Tue, 17 July 2012 15:46
It works when i compile in the term :
root@solinnen:~/Documents/testfox# g++-4.4 -m32 *.cpp -I /usr/local/include/fox-1.6/ -L ../FOX/Debug/ -lFOX -L /usr/lib32/ /usr/lib32/libXft.so.2


But i do not understand, if someone can explain to me?
Now how can i do this compilation in Eclipse?

In this case you explicitly name the Xft library to use for linking (remember: -L is usually for the library path). You can user this approach in Eclipse, too. You have to tweak the settings C/C++ Build->Settings->Linker settings


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compilation 32bit on 64bit plateform (advenced) [message #896391 is a reply to message #896367] Wed, 18 July 2012 09:15 Go to previous messageGo to next message
Gary All is currently offline Gary AllFriend
Messages: 7
Registered: July 2012
Junior Member
It works. I add /usr/lib32/ in FOX properties/C++build/settings/C++linker/libraries/library search path(-L) but i can not add /usr/lib32/libXft.so.2 in FOX properties/C++build/settings/C++linker/libraries/libraries(-l).

So i add it in FOX properties/C++build/settings/C++linker/Miscellaneous/other object
I find it dirty but it works.

Now i export my 32but application on my 32bit Debian:
./exe: error while loading shared libraries: libFOX.so: cannot open shared object file: No such file or directory.

Fox is a shared library because only with shared librares you have the option C++linker in properies if not how link others libraries (-lX11, -lXft, -lGLU) to a static library?
Re: Compilation 32bit on 64bit plateform (advenced) [message #896683 is a reply to message #896391] Thu, 19 July 2012 11:35 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Gary All wrote on Wed, 18 July 2012 11:15

Now i export my 32but application on my 32bit Debian:
./exe: error while loading shared libraries: libFOX.so: cannot open shared object file: No such file or directory.

What does ldd print out? Is libFOX.so in your /lib directory?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Eclipse CDT - display freeze on ubuntu
Next Topic:Obtaining call hierarchy
Goto Forum:
  


Current Time: Tue Apr 16 13:14:41 GMT 2024

Powered by FUDForum. Page generated in 0.10644 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top