[Trilinos-Users] [EXTERNAL] Re: Trilinos Build Problem

Perschbacher, Brent M bmpersc at sandia.gov
Thu Jan 16 14:00:01 MST 2014


Gary,
  You really don't want to force _WIN32 to be set if you aren't on a
windows machine creating a shared build. That macro is used to specify
which classes/functions will be publicly available inside DLL's. However,
it should be defined but as empty on non-windows machines. The last few
lines of the Teuchos_DLLExportMacro.h should have that assignment to
empty. I have an idea what might be causing this, but I'm not sure why it
wouldn't have caused us trouble before if it is the case. I will look into
it. In the mean time you can either build a static build (ie don't set
BUILD_SHARED_LIBS to ON) or you could add the empty define manually with
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS.

Brent

On 1/16/14 1:30 PM, "Gary.Myers.Contractor at unnpp.gov"
<Gary.Myers.Contractor at unnpp.gov> wrote:

>Kermit,
>
>Yes, I already have this set.  But, I feel that _WIN32 is not set (which
>my intuition suggest is correct) since I am not on a WIN 32 based
>computer.  I am on a Linux 64 bit cluster.  I guess I could force the
>_WIN32 to be defined and see what happens.
>
>Gary
>
>
>
>-----Original Message-----
>From: Bunde, Kermit A [mailto:bundeka at id.doe.gov]
>Sent: Thursday, January 16, 2014 3:02 PM
>To: Myers, Gary T (Contractor)
>Subject: RE: [Trilinos-Users] Trilinos Build Problem
>
>Gary,
>
> 
>
>Please ignore my last reply.  In doing a little google searching:
>
> 
>
>http://msdn.microsoft.com/en-us/library/b0084kay.aspx lists
>
> 
>
>_WIN32 as a predefined macro.
>
> 
>
> 
>
>Try adding this to your do_configure script:
>
> 
>
>  -D BUILD_SHARED_LIBS:BOOL=ON \
>
>Kermit Bunde 
>Enforcement Coordinator
>Criticality Safety SME
>Nuclear Safety SME
>DOE-ID Aviation Safety Officer
>208-526-5188 (office)
>208-526-1926 (fax)
>208-680-6843 (cell)
>"Accept the challenges so that you may feel the exhilaration of
>victory." 
>
>Never tell people how to do things. Tell them what to do and they will
>surprise you with their ingenuity."
>
>--George S. Patton Jr.,
>American Army general
>
> 
>
>From: trilinos-users-bounces at software.sandia.gov
>[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of
>Gary.Myers.Contractor at unnpp.gov
>Sent: Thursday, January 16, 2014 8:42 AM
>To: trilinos-users at software.sandia.gov
>Subject: [Trilinos-Users] Trilinos Build Problem
>
> 
>
>Hi, 
>
> 
>
>Newbie question here: First time build of Trilinos using CMake.
>
> 
>
>I am building Trilinos 11.4.2 on a Linux Cluster using Intel compilers;
>openMPI, MKL, . . .
>
> 
>
>CMake configuration is completed, but Teuchos fails  to compile because
>macro TEUCHOSCORE_LIB_DLL_EXPORT is not explicitly define.  The first
>reference occurs on line 82 of Teuchos_ScalarTraits.hpp.
>
> 
>
>In looking at Teuchos_DLLExportMacro.h, I could see how this could
>happen since _WIN32 probably is not defined.
>
> 
>
>Can someone suggest how I can get past this (please note that I am not
>in a position to easily share files since the Linux Cluster is not on
>the grid)?
>
> 
>
>Thanks,
>
> 
>
>Gary T. Myers
>
>Principal Scientist
>
>Bechtel Marine Propulsion Corp.
>
>Gary.Myers.contractor at unnpp.gov
>
>
>_______________________________________________
>Trilinos-Users mailing list
>Trilinos-Users at software.sandia.gov
>http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list