Skip to content

Commit f4369ba

Browse files
committed
Merge pull request stepcode#280 from stepcode/review/msvc_linker_fixes
Review/msvc linker fixes
2 parents e343668 + 02ef60a commit f4369ba

5 files changed

Lines changed: 17 additions & 9 deletions

File tree

src/clstepcore/STEPattribute.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,14 @@ bool operator == ( const STEPattribute & a1, const STEPattribute & a2 ) {
10521052
return false;
10531053
}
10541054

1055+
/** evaluate the equality of two attributes
1056+
* ignores _error and refCount, since those are ancillary
1057+
* \return true if not equal
1058+
*/
1059+
bool operator != ( const STEPattribute & a1, const STEPattribute & a2 ) {
1060+
return !( a1 == a2 );
1061+
}
1062+
10551063
/// return true if the attr descriptor is identical
10561064
bool sameADesc( const STEPattribute & a1, const STEPattribute & a2 ) {
10571065
return a1.aDesc == a2.aDesc;

src/clstepcore/STEPattribute.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,11 @@ class SC_CORE_EXPORT STEPattribute {
262262
STEPattribute( const class AttrDescriptor & d, SCLundefined * p );
263263

264264
/// return true if attr types and values match
265-
friend bool operator == ( const STEPattribute & a1, const STEPattribute & a2 );
266-
friend bool operator != ( const STEPattribute & a1, const STEPattribute & a2 ) {
267-
return !( a1 == a2 );
268-
}
265+
SC_CORE_EXPORT friend bool operator == ( const STEPattribute & a1, const STEPattribute & a2 );
266+
SC_CORE_EXPORT friend bool operator != ( const STEPattribute & a1, const STEPattribute & a2 );
269267

270268
/// return true if aDesc's match (behavior of old operator==)
271-
friend bool sameADesc ( const STEPattribute & a1, const STEPattribute & a2 );
269+
SC_CORE_EXPORT friend bool sameADesc ( const STEPattribute & a1, const STEPattribute & a2 );
272270
};
273271

274272
#endif

src/clstepcore/sdaiSelect.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ class SC_CORE_EXPORT SDAI_Select {
9090
int addFileId = 0,
9191
const char * currSch = 0 ) = 0;
9292

93-
virtual SDAI_Select & operator =( const SDAI_Select & ) = 0;
94-
9593
int set_null();
9694
int is_null();
9795

src/exp2cxx/classes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ void ENTITYhead_print( Entity entity, FILE * file ) {
10711071
strncpy( entnm, ENTITYget_classname( entity ), BUFSIZ );
10721072
entnm[BUFSIZ-1] = '\0';
10731073

1074-
fprintf( file, "\nclass %s : ", entnm );
1074+
fprintf( file, "\nclass SC_SCHEMA_EXPORT %s : ", entnm );
10751075

10761076
/* inherit from either supertype entity class or root class of
10771077
all - i.e. SDAI_Application_instance */

test/cpp/schema_specific/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ FUNCTION( add_schema_dependent_test name sdai_lib exe_args )
1616

1717
add_executable( tst_${name} "${name}.cc" )
1818
set_target_properties( tst_${name} PROPERTIES COMPILE_FLAGS "-I${sdai_src_path} ${ARGV3}" EXCLUDE_FROM_ALL ON )
19+
if(NOT "${ARGV4}" MATCHES "NONE")
20+
DEFINE_DLL_IMPORTS( "tst_${name}" "${ARGV4}" )
21+
endif(NOT "${ARGV4}" MATCHES "NONE")
1922
target_link_libraries( tst_${name} sdai_${sdai_lib} ${ARGV4} )
2023
add_test( NAME build_cpp_${name}
2124
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
@@ -39,7 +42,8 @@ SET(SC_ENABLE_TESTING OFF)
3942
SET(SC_ENABLE_TESTING ON)
4043

4144
add_schema_dependent_test( "aggregate_bound_runtime" "array_bounds_expr"
42-
"${SC_SOURCE_DIR}/test/p21/test_array_bounds.p21" )
45+
"${SC_SOURCE_DIR}/test/p21/test_array_bounds.p21"
46+
"" "stepcore")
4347

4448
#can't use the macro for this one because it depends on the test above and needs WILL_FAIL
4549
add_test( NAME test_aggregate_bound_runtime_FAIL1

0 commit comments

Comments
 (0)