Build error with latest source?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Build error with latest source?

kwende
Greetings,

I just pulled the latest source from https://github.com/PointCloudLibrary/pcl. I went thru the instructions on building for Windows. However, I immediately got this error (hundreds of times):

Error 4456 error C2487: 'pcl::Filter<PointT>::applyFilter' : member of dll interface class may not be declared with dll interface C:\pcl\pcl\filters\include\pcl\filters\random_sample.h 57 1 pcl_filters

Is this a known build error, or is there something misconfigured on my end?

Extra info:
Windows 8.1, VS 2010, 64 bit,

Thanks in advance,
Ben
Reply | Threaded
Open this post in threaded view
|

RE: Build error with latest source?

Romain Brégier

Hi,

 

I compiled successfully the sources pulled on monday or so from trunk with Win7 32 bits, VS2010 (except for a deprecated saveToPng function I had to delete, but  with hundreds of warnings). Thus it might comes from your configuration.

 

If your problem is DLL related, you might try to compile as a static lib (CMAKE option PCL_SHARED_LIBS off according to http://pointclouds.org/documentation/tutorials/building_pcl.php ) to work around the issue.

 

Regards,

Romain

 

De : kwende [via Point Cloud Library (PCL) Users mailing list] [mailto:[hidden email]]
Envoyé : mardi 17 décembre 2013 23:23
À : Romain Brégier
Objet : Build error with latest source?

 

Greetings,

I just pulled the latest source from https://github.com/PointCloudLibrary/pcl. I went thru the instructions on building for Windows. However, I immediately got this error (hundreds of times):

Error 4456 error C2487: 'pcl::Filter<PointT>::applyFilter' : member of dll interface class may not be declared with dll interface C:\pcl\pcl\filters\include\pcl\filters\random_sample.h 57 1 pcl_filters

Is this a known build error, or is there something misconfigured on my end?

Extra info:
Windows 8.1, VS 2010, 64 bit,

Thanks in advance,
Ben


If you reply to this email, your message will be added to the discussion below:

http://www.pcl-users.org/Build-error-with-latest-source-tp4031369.html

To start a new topic under Point Cloud Library (PCL) Users mailing list, email [hidden email]
To unsubscribe from Point Cloud Library (PCL) Users mailing list, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Build error with latest source?

kwende
I wonder if one key here is you're building for 32-bit. I'll try that.
Reply | Threaded
Open this post in threaded view
|

RE: Build error with latest source?

Romain Brégier

By the way if it helps, I also had to launch Visual Studio 2010 in Admin mode in order to achieve compilation.

 

De : kwende [via Point Cloud Library (PCL) Users mailing list] [mailto:[hidden email]]
Envoyé : mercredi 18 décembre 2013 16:02
À : Romain Brégier
Objet : RE: Build error with latest source?

 

I wonder if one key here is you're building for 32-bit. I'll try that.


If you reply to this email, your message will be added to the discussion below:

http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031376.html

To start a new topic under Point Cloud Library (PCL) Users mailing list, email [hidden email]
To unsubscribe from Point Cloud Library (PCL) Users mailing list,
click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Build error with latest source?

kwende
I have no idea what's going on, but I had to comment out a line of code to get it to work. Personally, I'm curious why this code exists in the first place (there are plenty of clearer ways of calling base functions):

      using Filter<PointT>::initCompute;
      using Filter<PointT>::deinitCompute;
      //using Filter<PointT>::applyFilter;

Once I commented that code out, everything builds. So...I kind of doubt it's a configuration issue.
Reply | Threaded
Open this post in threaded view
|

RE: Build error with latest source?

sivsko
This post has NOT been accepted by the mailing list yet.
i have the same problem, first i tryed the 64bit, i found out that if you have VS2010 SP1 you run in to this problem IntelliSense: PCH warning: header stop cannot be in a macro or #if block. An intellisense PCH file was not generated

one sugested sulution was to add #pragma once in front, see #pragma onces description

Now i have removed all 64bit, and only installed 32bit i have set cmake PCL_shared_libs to off i get the same mistake when i try to build pcl_filters
this is the error:
"Error 1 error C2487: 'pcl::Filter<PointT>::applyFilter' : member of dll interface class may not be declared with dll interface C:\PCL_dependencies\trunk\filters\include\pcl\filters\shadowpoints.h 54 1 pcl_filters"

when i then click on the error to get to the point where the compile complaines the shadowpoints.h popes up but it get an extra error, this one:
" 206 IntelliSense: PCH warning: header stop cannot be in a macro or #if block.  An intellisense PCH file was not generated. c:\pcl_dependencies\trunk\filters\include\pcl\filters\shadowpoints.h 45 1 pcl_filters
"

Im running VS2010 as administrator. aby idears?
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

nizar sallem
In reply to this post by kwende
That is C++ best practices ;)

Cheers,
--
Nizar

On 19/12/2013 16:06, kwende wrote:

> I have no idea what's going on, but I had to comment out a line of code to
> get it to work. Personally, I'm curious why this code exists in the first
> place (there are plenty of clearer ways of calling base functions):
>
>        using Filter<PointT>::initCompute;
>        using Filter<PointT>::deinitCompute;
>        //using Filter<PointT>::applyFilter;
>
> Once I commented that code out, everything builds. So...I kind of doubt it's
> a configuration issue.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031389.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

kwende
I have no doubt there is a legit reason for using it. Any idea as to why it is causing such issues for a couple of us, however?

Is the line I commented out going to cause me issues?
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

nizar sallem
On which file please ?
As it is on the github there is now using::applyFilter in
filters\include\pcl\filters\random_sample.h

Cheers,
--
Nizar

On 19/12/2013 20:37, kwende wrote:

> I have no doubt there is a legit reason for using it. Any idea as to why it
> is causing such issues for a couple of us, however?
>
> Is the line I commented out going to cause me issues?
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031405.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

kwende
I did a global search for "using Filter<PointT>::applyFilter" and it only shows up in one place:

filter_indices.h

Once I commented this out, the compilation errors completely went away.
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

nizar sallem
Thing is I can not find it on last sources.

--
Nizar

On 19/12/2013 22:10, kwende wrote:

> I did a global search for "using Filter<PointT>::applyFilter" and it only
> shows up in one place:
>
> filter_indices.h
>
> Once I commented this out, the compilation errors completely went away.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031407.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

sivsko
This post has NOT been accepted by the mailing list yet.
In reply to this post by kwende
same for me, i wounder why i need to comment it out.
"
   protected:
      using Filter<PointT>::initCompute;
      using Filter<PointT>::deinitCompute;
      //using Filter<PointT>::applyFilter;

"
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

kwende
In reply to this post by nizar sallem
nizar, I'm not sure I know why you're not finding it.

This file: https://github.com/PointCloudLibrary/pcl/blob/master/filters/include/pcl/filters/filter_indices.h.

Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

nizar sallem
I will check that and be back to you.

Cheers,
--
Nizar

On 20/12/2013 16:52, kwende wrote:

> nizar, I'm not sure I know why you're not finding it.
>
> This file:
> https://github.com/PointCloudLibrary/pcl/blob/master/filters/include/pcl/filters/filter_indices.h.
>
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031426.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

kwende
Thanks for your assistance.
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

nizar sallem
Anyway I am not 100% sure yet but will dig deeper, but I believe it is
safe to remove using::applyFilter since it is a protected member
function and there is no need to make it in the public namespace.

Cheers,
--
Nizar

On 20/12/2013 17:01, kwende wrote:

> Thanks for your assistance.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Build-error-with-latest-source-tp4031369p4031429.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Build error with latest source?

Sergey
Administrator
Hi all,

I have submitted a pull request that properly resolves this issue: https://github.com/PointCloudLibrary/pcl/pull/449

Also please see my comment for the explanation of the problem: https://github.com/PointCloudLibrary/pcl/issues/426#issuecomment-32490027

Regards,
Sergey