The library that you want to link to has to be built with -fPIC, not the code that uses the library. I had to add this option to build two external projects, but I did not touch MITK. I could build MITK (a snapshot from last Friday) successfully on Ubuntu 11.04 amd64 and XP x32. Maybe, you can try to add -fPIC to the default compiler flags, when building MITK, until some normal fix arrives. There is some CMake variable in the advanced settings.
Miklos On Wed, Sep 14, 2011 at 6:23 PM, Clarkson, Matt <[email protected]> wrote: > Hi there, > > on my Centos machine, I have started to get the following error when > compiling MITK > > CMakeFiles/QmitkExt.dir/QmitkModuleTableModel.cpp.o: relocation > R_X86_64_PC32 against `mitk::GetModuleContext()' can not be used when making > a shared object; recompile with -fPIC > > I have not yet seen this on my Mac. > I also tried downloading the a brand new MITK-Project-Template, and doing a > clean fresh rebuild, and that produces the same error. > I also tried putting the -fPIC flag in there, and I still seem to get the > same error, unless of course, it is needed on a dependent library. > > Is anyone else getting this? Is it just Centos? Or is it just me? > I'm happy to keep investigating if necessary... but I do need it fixing.. so > happy if someone can confirm whether its a widespread issue, or something > silly I have done. > > Thanks as always. > > Matt > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
