Author Topic: How to compile PCL Sandbox program with MS VC2012  (Read 6428 times)

Offline dgruber

  • Newcomer
  • Posts: 11
  • Dr. Franz Gruber
How to compile PCL Sandbox program with MS VC2012
« on: 2014 February 11 11:35:31 »
We have installed Win 7 Prof and Framework.NET 4.5.1
We have installed the latest PI 1.8 1087
We have installed the latest PCL version
we produced the projectfile with Script Makefile
using this parameter:
C:/PCL/src/modules/processes/Sandbox
_ITERATOR_DEBUG_LEVEL=0
C:/PCL/include
C:/PCL/lib/windows/vc11/x86_64
C:/PCL/lib/windows/vc11/x86_64/PCL-pxi.lib

Makefile runs without errormessages


If we compile projectfile Sandbox.vcxproj with
MS VisualStudio 2012 we get the compile o.k for all modules
BUT we afterwards get the LINK-error messages:

Fehler   1   error LNK2038: Konflikt ermittelt für "_MSC_VER": Der Wert "1600" stimmt nicht mit dem Wert "1700" in SandboxInstance.obj überein.   C:\PCL\src\modules\processes\Sandbox\windows\vc11\PCL-pxi.lib(Console.obj)   Sandbox

it seems PCL-pxi.lib is compiled with an older compiler version?

Franz, Manfred and Gerald  :o
« Last Edit: 2014 February 11 11:56:01 by dgruber »
Fiii

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #1 on: 2014 February 11 12:02:06 »
This is strange, since the PCL library has been built with Visual Studio 2012. Anyway, you can recompile PCL on your machine. Simply load the PCL.vcxproj project file from the src/PCL/windows/vc11 directory. Perhaps you'll have to change some project settings, but if your environment variables are well configured (in particular, PCLINCDIR and PCLLIBDIR64), you shouldn't need to change anything. Select the "Release | x64" configuration, press F7, and PCL will be rebuilt from source.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #2 on: 2014 February 11 12:06:26 »
The linker error usually shows when selecting the x32 architecture, or the debug option, in VS2012.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #3 on: 2014 February 11 12:14:47 »
Ah yes, of course. 32-bit PCL development is no longer supported. All modules must be built for the x64 architecture.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #4 on: 2014 February 11 12:32:26 »
I had tried (a little) to compile with VS2012. However I gave up as it was too long and complicated to find which property files has to be created where in that version of VS, just to set the PCLINCDIR etc...
I installed PCBSD in a virtual box and was able to compile there relatively quickly (when I realized that the instructions are wrong: you need gmake but clang). Not a solution for everybody but maybe developing in a VM  on BSD may be more convenient (if you are familiar with Unix) and avoid disturbing your main installation.
-- bitli

Offline dgruber

  • Newcomer
  • Posts: 11
  • Dr. Franz Gruber
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #5 on: 2014 February 11 12:44:14 »
Hi Juan!
Thanks for your fast help.
Recompiling the PCL.vcxproj  Project did the job.
Our version of the Sandbox.pxi(pxm).dll was created, could be integrated, and is
running properly.

Thanks

Franzi, Manfred and Gerald  :) :) :)
Fiii

Offline hvb356

  • PixInsight Enthusiast
  • **
  • Posts: 77
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #6 on: 2014 February 12 08:55:44 »
Hi Juan,

following your advise, VS 2013 (!) produced 59 errors when I compiled PCL.vcxproj:

Error    2    error C2535: 'pcl::RGBColorSystem::RGBColorSystem(const pcl::RGBColorSystem &)' : member function already defined or declared (..\..\AdaptiveLocalFilter.cpp)    C:\Program Files\PixInsight\PCL\include\pcl
\RGBColorSystem.h    1566    1    PCL

+ 59 other modules.

I pledge with a smile, that all parms have been checked and double checked several times. The same error popped up, when compiling the SandBox.

Any idea, what I'm doing wrong?

All the best

Hartmut

TOA-150, ML8300, CFW2-7 w. Astronomik HaLRGB, PDF, EM-400, guiding FS-60 + ST402, ASCOM bsd. image acquisition

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #7 on: 2014 February 12 09:05:50 »
Do you have VS 2012 installed? Upgrading the projects to VS2013 doesn't work. You should use 2012 tools to build the modules (they are automatically called within VS2013, if you instaled VS2012).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline hvb356

  • PixInsight Enthusiast
  • **
  • Posts: 77
Re: How to compile PCL Sandbox program with MS VC2012
« Reply #8 on: 2014 February 12 09:35:52 »
Hi Carlos,

thank you. That's a helpful statement.

All the best

Hartmut

TOA-150, ML8300, CFW2-7 w. Astronomik HaLRGB, PDF, EM-400, guiding FS-60 + ST402, ASCOM bsd. image acquisition