Skip to content

Commit

Permalink
host_writer undefined symbol blues
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodr committed Nov 22, 2016
1 parent f502a22 commit a447459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions api/pcmsolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ typedef enum {
* \param[in] message_length length of the passed message
* This function **must** be defined by the host program
*/
#ifdef _WIN32
#if defined(PCMSOLVER_BUILD_SHARED) /* build dll */
__declspec(dllimport)
#endif
#endif
void host_writer(const char * message, int message_length);

/*! \brief Creates a new PCM context object
Expand Down
2 changes: 2 additions & 0 deletions cmake/custom/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ if(CMAKE_SYSTEM_NAME MATCHES Windows)
add_definitions(-DPCMSOLVER_BUILD_SHARED)
# Get math constants such as M_PI
add_definitions(-D_USE_MATH_DEFINES)
# Mark as undefined symbols that have to be defined by the host
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-U,host_writer")
endif()

0 comments on commit a447459

Please sign in to comment.