From: <and...@us...> - 2008-09-09 09:55:39
|
Revision: 8759 http://plplot.svn.sourceforge.net/plplot/?rev=8759&view=rev Author: andrewross Date: 2008-09-09 09:55:50 +0000 (Tue, 09 Sep 2008) Log Message: ----------- Fix tcl / tk bindings to work with gcc -fvisibility=hidden flag. Modified Paths: -------------- trunk/bindings/tcl/CMakeLists.txt trunk/bindings/tk/CMakeLists.txt trunk/bindings/tk/pltk.h trunk/bindings/tk/tkMain.c trunk/include/pdf.h trunk/include/plplotP.h Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/bindings/tcl/CMakeLists.txt 2008-09-09 09:55:50 UTC (rev 8759) @@ -39,15 +39,8 @@ "-I${TCL_INCLUDE_PATH}" ) -if(WIN32 AND BUILD_SHARED_LIBS) - SET(libvar "tclmatrix${LIB_TAG}_LIB_SRCS") - include_directories( - ${CMAKE_SOURCE_DIR}/include - ) -endif(WIN32 AND BUILD_SHARED_LIBS) - if(BUILD_SHARED_LIBS) - SET_SOURCE_FILES_PROPERTIES(${${libvar}} + SET_SOURCE_FILES_PROPERTIES(${tclmatrix${LIB_TAG}_LIB_SRCS} PROPERTIES COMPILE_FLAGS "-DMAKINGPLDLL" ) endif(BUILD_SHARED_LIBS) @@ -162,6 +155,11 @@ libplplottcltk${LIB_TAG}_COMPILE_FLAGS "${libplplottcltk${LIB_TAG}_COMPILE_FLAGS} ${TKLIB_COMPILE_FLAGS}" ) + if(BUILD_SHARED_LIBS) + set_source_files_properties(${plplottcltk${LIB_TAG}_LIB_SRCS} + PROPERTIES COMPILE_FLAGS "-DUSINGPLDLL" + ) + endif(BUILD_SHARED_LIBS) set(plplottcltk${LIB_TAG}_link_libraries ${plplottcltk${LIB_TAG}_link_libraries} ${TK_LIBRARY} Modified: trunk/bindings/tk/CMakeLists.txt =================================================================== --- trunk/bindings/tk/CMakeLists.txt 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/bindings/tk/CMakeLists.txt 2008-09-09 09:55:50 UTC (rev 8759) @@ -95,6 +95,12 @@ ${CMAKE_BINARY_DIR}/include ) + + if(BUILD_SHARED_LIBS) + SET_SOURCE_FILES_PROPERTIES(plserver.c + PROPERTIES COMPILE_FLAGS "-DUSINGPLDLL" ) + endif(BUILD_SHARED_LIBS) + add_executable(plserver plserver.c) target_link_libraries(plserver plplot${LIB_TAG} plplottcltk${LIB_TAG}) Modified: trunk/bindings/tk/pltk.h =================================================================== --- trunk/bindings/tk/pltk.h 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/bindings/tk/pltk.h 2008-09-09 09:55:50 UTC (rev 8759) @@ -23,12 +23,12 @@ #define TCL_STORAGE_CLASS DLLEXPORT #endif /* BUILD_Vfs */ -EXTERN int +EXTERN PLDLLIMPEXP int Pltk_Init( Tcl_Interp *interp ); /* Main program for wish, with PLplot extensions. */ -int +EXTERN PLDLLIMPEXP int pltkMain(int argc, const char **argv, char *RcFileName, int (*AppInit)(Tcl_Interp *interp)); Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/bindings/tk/tkMain.c 2008-09-09 09:55:50 UTC (rev 8759) @@ -176,7 +176,7 @@ *---------------------------------------------------------------------- */ -int +PLDLLIMPEXP int pltkMain(int argc, const char **argv, char *RcFileName, int (*AppInit)(Tcl_Interp *interp)) { Modified: trunk/include/pdf.h =================================================================== --- trunk/include/pdf.h 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/include/pdf.h 2008-09-09 09:55:50 UTC (rev 8759) @@ -84,14 +84,14 @@ void pdf_set PLARGS((char *option, int value)); PDFstrm *pdf_fopen PLARGS((const char *fileName, const char *mode)); -PDFstrm *pdf_bopen PLARGS((U_CHAR *buffer, long bufmax)); +PLDLLIMPEXP PDFstrm *pdf_bopen PLARGS((U_CHAR *buffer, long bufmax)); PLDLLIMPEXP PDFstrm *pdf_finit PLARGS((FILE *file)); PDFstrm *plLibOpenPdfstrm PLARGS((const char *fn)); PLDLLIMPEXP int pdf_close PLARGS((PDFstrm *pdfs)); int pdf_putc PLARGS((int c, PDFstrm *pdfs)); -int pdf_getc PLARGS((PDFstrm *pdfs)); -int pdf_ungetc PLARGS((int c, PDFstrm *pdfs)); +PLDLLIMPEXP int pdf_getc PLARGS((PDFstrm *pdfs)); +PLDLLIMPEXP int pdf_ungetc PLARGS((int c, PDFstrm *pdfs)); int pdf_rdx PLARGS((U_CHAR *x, long nitems, PDFstrm *pdfs)); PLDLLIMPEXP int pdf_rd_header PLARGS((PDFstrm *pdfs, char *header)); Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2008-09-09 09:16:57 UTC (rev 8758) +++ trunk/include/plplotP.h 2008-09-09 09:55:50 UTC (rev 8759) @@ -507,7 +507,7 @@ /* Bin up cmap 1 space and assign colors to make inverse mapping easy. */ -void +PLDLLIMPEXP void plcmap1_calc(void); /* Draws a slanting tick at position (mx,my) (measured in mm) of */ @@ -924,7 +924,7 @@ /* Escape function, for driver-specific commands. */ -void +PLDLLIMPEXP void plP_esc(PLINT op, void *ptr); /* Set up plot window parameters. */ @@ -939,17 +939,17 @@ /* Does required startup initialization of library. */ -void +PLDLLIMPEXP void pllib_init(void); /* Does preliminary setup of device driver. */ -void +PLDLLIMPEXP void pllib_devinit(void); /* Utility to copy one PLColor to another. */ -void +PLDLLIMPEXP void pl_cpcolor(PLColor *to, PLColor *from); /* Does required startup initialization of a stream. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |