Hartmut Kaiser <hartmut.kaiser@...> writes:

>

Hartmut- thanks for your prompt response.  Unfortunately, I was not 
subscribed to the list at the time and I never saw your response.  I only 
just now had the insight to search gmane for this thread, and lo and 
behold...  I've since subscribed to the mailing list.

> 
> 
> > I’ve got a Windows-specific issue trying to build my code, and I’m not
> > sure how to address this.  Visual Studio 2013 fails to compile the code
> > with  the following error message:
> > 
> > error C2491:
> > 
'hpx::traits::component_type_database<fx::core::Parameter_Group_Server,voi
> > d>::get' : definition of dllimport function not allowed
> > 
> > Visual Studio shows the line of code containing the error as the
> > invocation of macro HPX_REGISTER_COMPONENT.
> > 
> > The error is obviously not present on my Linux box (using clang and 
Intel
> > icpc compilers).
> > 
> > It has been my intention to use VS for development (the code is intended
> > ultimately to run on Linux / Intel Phi).  As such, I have gotten the 
code
> > to apparently compile successfully by putting the macro call within
> > #ifndef _MSC_VER #end.  I suspect that this will work to allow me to
> > continue development, but it also definitely means that I cannot run 
unit
> > tests for any hpx component type on Windows, which means that I need to
> > find a solution to this rather than relying on this workaround.
> > 
> > Any suggestions would be greatly appreciated.
> 
> Blending out that macro for VS is not a solution. 

I completely agree.  I just needed a temporary way to get the code to 
compile correctly...  That's why I'm asking this question :)

Could you please give us
> more information on how you build your code? Do you use cmake to generate
> the VS solution for it? The cause of this is most likely a missing macro
> which will have to be defined on the compiler command line.

Right now, I've just created the VS solution manually for this project.  In 
the past I've used Tup on my Linux systems (and used the pkg-config 
approach).  I'm not at all familiar with cmake, and before this, I never had 
the need to be...

I've put the code on pastebin instead of copying it into this post...  If 
this is a problem, please let me know-

Parameter_Group_Server.hpp
http://pastebin.com/pQcRgDrF

Parameter_Group_Server.cc
http://pastebin.com/E4MY91pU

Visual Studio compiler log:
http://pastebin.com/vvKcCV5t

In addition, I've also copied the relevant portion of the preprocessor 
output (i.e. ignoring all of the system/hpx includes). 
http://pastebin.com/58u7DsYJ

(re-formatted for clarity w/ clang-format)
http://pastebin.com/DcbeTDva


Hopefully, the above information is sufficiently thorough.  I greatly 
appreciate your assistance with this.

Thanks again and best regards,
Shmuel
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to