News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Developing 64 bit apps under 32 bit. What compile options for external lib ?

Started by Juanma Font, March 17, 2010, 05:48:52 PM

Previous topic - Next topic

Juanma Font

Hellooo ¡¡

 I am poor, not enought money to change my old pc with old architecture of 32bits.  ;)

 I'm developing a graphics project, trying to build the .deb packet for 32bits version,  but also, I would produce .deb packet for 64bits version.

  I read this wiki page -> http://wiki.codeblocks.org/index.php?title=Developing_32_bit_apps_under_64_bit_Linux_%28Ubuntu%29
  and applied all that there is said, but with inverted number of bits,  trying to develop 64bits from 32bits ;)

  Now,  I have :
 
    /usr/include....  (this is my real architecture , 32 bits)

    and

   /usr/i64/include   (this is for the"extra" architecture, 64 bits)

   The problem is that my project uses boost libraries.. ( www.boost.org )

   I downloaded 64 bits  version of boost and "installed/descompress" into /usr/i64/include/boost

   I create a new target on C::B  into my project  called "Release64" (like the wiki page says)

    and this are the build options->Compiler Settings->other options  
---------------------------
-m64
`wx-config --prefix=/usr/i64 --cflags`
`gsl-config --prefix=/usr/i64 --cflags`
-Winvalid-pch
-include wx_pch.h
-I/usr/i64/include/boost
----------------------------

  Then, when begin try to compile, all goes ok, until  compile one file which need some boost code..

That is what "Build log" show   (note that  the system is searching into  /usr/i64/include/boost/gil  when try to compile "blend.cpp" )

-------------- Build: Release64 in zeronoise ---------------

Precompiling header: wx_pch.h
Compiling: ZNApp.cpp
Compiling: ZNMain.cpp
Compiling: ZnGUIFrame.cpp
Compiling: bigmodule.cpp
Compiling: blend.cpp
/home/juanma/proyectos/codeblocks/zeronoise/blend.cpp: In member function 'void Blend::LoadBlendMap()':
/home/juanma/proyectos/codeblocks/zeronoise/blend.cpp:130: error: no match for 'operator=' in 'dimensions = boost::gil::png_read_dimensions(const char*)()'
/usr/i64/include/boost/gil/utilities.hpp:78: note: candidates are: boost::gil::point2<T>& boost::gil::point2<T>::operator=(const boost::gil::point2<T>&) [with T = int]

....  blah.. blah....

------------------------------------------------------------------------
 
  Of course, thereis not problem for target "Release32"

  what is happenig ?

 Thanks...

Juanma Font

Hello,  the question has been solved into another forum, the boost user mail list.

   Look, there is 'a bug' when try to compile under 64bits...

    The solution can be see here -> http://lists.boost.org/boost-users/2010/03/57506.php

   So, It was not an especial option to compile 64bits under 32bits system.

   Thank you....