I have been doing some work on imread(). I'm not well-versed in the compiling/linking process, and have had trouble with this on my Mac. I have the image-1.0.6 package on my mac and can use it. What I cannot do is make changes to a file like __magick_read__.cc and then compile it on the Mac. It's not my changes which are at fault. For the last few weeks I've been using a linux machine instead, where I've got things setup correctly (I guess), and I can run something like

mkoctfile __magick_read__.cc `Magick++-config --cppflags` -lMagick ++ -lMagick

without an error. (My changes, which involve an effort to move away from ImageMagick and towards GraphicsMagick, compile, and the routine is usable on that machine.) But on the Mac I get all kinds of "undefined symbol" messages from ld (see below). I'm guessing this problem stems from looking for libraries (and perhaps header files) in the wrong places. (I do not know which libraries these symbols come from.) I hardcoded the locations of "oct.h" and "Magick++.h" into __magick_read__.cc, (i.e., changed #include octave/oct.h to #include /sw/include/octave3.0.0/octave/oct.h), but that had no effect. I recently got GraphicsMagick to compile from source on this machine by doing

 ln -s /sw /Developer/SDKs/MacOSX10.4u.sdk/sw
./configure CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk/ -arch i386 -I/sw/include/" LDFLAGS="-Wl,-syslibroot,/ Developer/SDKs/MacOSX10.4u.sdk/,-L/sw/lib/" --prefix=/sw --with- quantum-depth=16 --disable-dependency-tracking --with-x=yes --x- includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ --without-perl

This was a modification of the instructions someone had supplied for compiling GraphicsMagick on a Mac (and probably reveals how little I know about what I'm doing). Nevertheless, even if I fully understood what I did above, it is not clear to me how these options fed to a configure script translate into options fed to mkoctfile.

Can anyone who uses a Mac help me get through this compile?

Mac18965:~/devel scofield$ mkoctfile __magick_read__.cc `GraphicsMagick++-config --cppflags` -lGraphicsMagick++ -lGraphicsMagick
/usr/bin/ld: Undefined symbols:
_XCloseDisplay
_XOpenDisplay
_XSetErrorHandler
_cmsCloseProfile
_cmsCreateTransform
_cmsDeleteTransform
_cmsDoTransform
_cmsErrorAction
_cmsGetColorSpace
_cmsOpenProfileFromMem
_BZ2_bzclose
_BZ2_bzerror
_BZ2_bzflush
_BZ2_bzopen
_BZ2_bzread
_BZ2_bzwrite
_XAllocSizeHints
_XAllocStandardColormap
_XChangeGC
_XChangeProperty
_XChangeWindowAttributes
_XClearWindow
_XCreateBitmapFromData
_XCreateGC
_XCreatePixmap
_XDefaultColormap
_XDefaultScreen
_XDestroyWindow
_XDisplayHeight
_XDisplayWidth
_XEventsQueued
_XFillRectangle
_XFree
_XFreeFont
_XFreeGC
_XFreePixmap
_XGetWindowAttributes
_XGetWindowProperty
_XInstallColormap
_XInternAtom
_XLookupString
_XMapRaised
_XMapWindow
_XNextEvent
_XPutImage
_XReconfigureWMWindow
_XRefreshKeyboardMapping
_XRootWindow
_XSelectInput
_XSetInputFocus
_XSetTransientForHint
_XSetWMName
_XSetWindowBackgroundPixmap
_XStringListToTextProperty
_XSync
_XVisualIDFromVisual
_XWMGeometry
_XWithdrawWindow
_XAllocClassHint
_XAllocColor
_XAllocColorCells
_XAllocIconSize
_XAllocWMHints
_XAllowEvents
_XBell
_XBitmapPad
_XBlackPixel
_XCheckMaskEvent
_XCheckTypedWindowEvent
_XCopyArea
_XCopyColormapAndFree
_XCopyPlane
_XCreateColormap
_XCreateFontCursor
_XCreateImage
_XCreatePixmapCursor
_XCreateWindow
_XDefaultDepth
_XDefaultVisual
_XDefineCursor
_XDeleteProperty
_XDisplayName
_XDrawArc
_XDrawImageString
_XDrawLine
_XDrawLines
_XDrawRectangle
_XFillArc
_XFillPolygon
_XFlush
_XFreeColormap
_XFreeColors
_XFreeCursor
_XGetDefault
_XGetGeometry
_XGetIconSizes
_XGetImage
_XGetRGBColormaps
_XGetVisualInfo
_XGetWMColormapWindows
_XGetWMName
_XGrabPointer
_XGrabServer
_XKillClient
_XListInstalledColormaps
_XLoadQueryFont
_XParseColor
_XParseGeometry
_XQueryColor
_XQueryColors
_XQueryPointer
_XQueryTree
_XRaiseWindow
_XResourceManagerString
_XSendEvent
_XSetBackground
_XSetClipMask
_XSetCloseDownMode
_XSetFillStyle
_XSetForeground
_XSetLocaleModifiers
_XSetStipple
_XSetWMIconName
_XSetWMProperties
_XSetWMProtocols
_XSetWindowColormap
_XShapeCombineMask
_XShapeQueryExtension
_XShmAttach
_XShmCreateImage
_XShmDetach
_XShmPutImage
_XShmQueryExtension
_XStoreColors
_XSupportsLocale
_XSynchronize
_XTranslateCoordinates
_XUngrabPointer
_XUngrabServer
_XWhitePixel
_XWindowEvent
_XrmCombineDatabase
_XrmCombineFileDatabase
_XrmGetDatabase
_XrmGetResource
_XrmGetStringDatabase
_XrmInitialize
_XrmPutFileDatabase
_XrmPutStringResource
_XCheckWindowEvent
_XClearArea
_XConvertSelection
_XDrawString
_XFreeStringList
_XGetCommand
_XIfEvent
_XPutBackEvent
_XReadBitmapFile
_XSetFont
_XSetFunction
_XSetNormalHints
_XTextWidth
_FT_Done_Face
_FT_Done_FreeType
_FT_Done_Glyph
_FT_Get_Char_Index
_FT_Get_Glyph
_FT_Get_Kerning
_FT_Glyph_To_Bitmap
_FT_Glyph_Transform
_FT_Init_FreeType
_FT_Load_Glyph
_FT_New_Face
_FT_Outline_Decompose
_FT_Outline_Get_BBox
_FT_Select_Charmap
_FT_Set_Char_Size
_FT_Set_Charmap
_FT_Vector_Transform
_XDefaultGC
_XCheckIfEvent
_XCreatePixmapFromBitmapData
_XFreeFontNames
_XGetSelectionOwner
_XListFonts
_XSetClipRectangles
_XSetSelectionOwner
_XDPSCreatePixmapForEPSF
_XDPSImageFileIntoDrawable
_XDPSPixelsPerPoint
_jas_cleanup
_jas_iccprof_createfromcmprof
_jas_iccprof_destroy
_jas_iccprof_save
_jas_image_addcmpt
_jas_image_create0
_jas_image_decode
_jas_image_destroy
_jas_image_encode
_jas_image_getcmptbytype
_jas_image_readcmpt
_jas_image_strtofmt
_jas_image_writecmpt
_jas_init
_jas_matrix_create
_jas_matrix_destroy
_jas_stream_close
_jas_stream_flush
_jas_stream_memopen
_jpeg_CreateCompress
_jpeg_CreateDecompress
_jpeg_calc_output_dimensions
_jpeg_destroy_compress
_jpeg_destroy_decompress
_jpeg_finish_compress
_jpeg_finish_decompress
_jpeg_read_header
_jpeg_read_scanlines
_jpeg_resync_to_restart
_jpeg_set_defaults
_jpeg_set_marker_processor
_jpeg_set_quality
_jpeg_simple_progression
_jpeg_start_compress
_jpeg_start_decompress
_jpeg_std_error
_jpeg_write_marker
_jpeg_write_scanlines
_BZ2_bzCompress
_BZ2_bzCompressEnd
_BZ2_bzCompressInit
_BZ2_bzDecompress
_BZ2_bzDecompressEnd
_BZ2_bzDecompressInit
_xmlAddAttributeDecl
_xmlAddChild
_xmlAddDocEntity
_xmlAddDtdEntity
_xmlAddElementDecl
_xmlAddNotationDecl
_xmlCleanupParser
_xmlCreateIntSubset
_xmlCreatePushParserCtxt
_xmlDetectCharEncoding
_xmlFree
_xmlFreeInputStream
_xmlFreeParserCtxt
_xmlGetDocEntity
_xmlGetLastChild
_xmlGetParameterEntity
_xmlLoadExternalEntity
_xmlMalloc
_xmlNewCDataBlock
_xmlNewCharRef
_xmlNewDoc
_xmlNewDtd
_xmlNewReference
_xmlParseChunk
_xmlParseExternalSubset
_xmlPopInput
_xmlPushInput
_xmlSplitQName
_xmlStrdup
_xmlSubstituteEntitiesDefault
_xmlSwitchEncoding
_xmlTextConcat
_TIFFClose
_TIFFGetField
_TIFFGetFieldDefaulted
_TIFFNumberOfStrips
_TIFFOpen
_TIFFReadRawStrip
_TIFFReverseBits
_png_create_info_struct
_png_create_read_struct_2
_png_create_write_struct_2
_png_destroy_read_struct
_png_destroy_write_struct
_png_error
_png_free
_png_get_PLTE
_png_get_cHRM
_png_get_error_ptr
_png_get_gAMA
_png_get_header_ver
_png_get_iCCP
_png_get_io_ptr
_png_get_libpng_ver
_png_get_pHYs
_png_get_sRGB
_png_get_text
_png_get_x_offset_pixels
_png_get_y_offset_pixels
_png_malloc
_png_permit_mng_features
_png_read_end
_png_read_info
_png_read_row
_png_read_update_info
_png_set_PLTE
_png_set_bKGD
_png_set_cHRM
_png_set_compression_buffer_size
_png_set_compression_level
_png_set_compression_mem_level
_png_set_compression_strategy
_png_set_filter
_png_set_gAMA
_png_set_iCCP
_png_set_interlace_handling
_png_set_keep_unknown_chunks
_png_set_oFFs
_png_set_pHYs
_png_set_packing
_png_set_read_fn
_png_set_sRGB
_png_set_sig_bytes
_png_set_tRNS
_png_set_text
_png_set_write_fn
_png_warning
_png_write_end
_png_write_info
_png_write_row
_xmlFreeDoc
_TIFFClientOpen
_TIFFDefaultTileSize
_TIFFGetConfiguredCODECs
_TIFFGetVersion
_TIFFIsByteSwapped
_TIFFIsTiled
_TIFFPrintDirectory
_TIFFReadDirectory
_TIFFReadEncodedStrip
_TIFFReadRGBAImage
_TIFFReadRGBAStrip
_TIFFReadRGBATile
_TIFFReadScanline
_TIFFReadTile
_TIFFScanlineSize
_TIFFSetErrorHandler
_TIFFSetField
_TIFFSetWarningHandler
_TIFFStripSize
_TIFFSwabArrayOfDouble
_TIFFSwabArrayOfLong
_TIFFSwabArrayOfShort
_TIFFSwabArrayOfTriples
_TIFFTileRowSize
_TIFFTileSize
_TIFFVStripSize
_TIFFWriteDirectory
_TIFFWriteScanline
_TIFFWriteTile
_xmlNanoFTPClose
_xmlNanoFTPConnect
_xmlNanoFTPGet
_xmlNanoFTPInit
_xmlNanoFTPNewCtxt
_xmlNanoHTTPCleanup
_xmlNanoHTTPClose
_xmlNanoHTTPOpen
_xmlNanoHTTPRead
_XInitImage
collect2: ld returned 1 exit status


Thomas L. Scofield
--------------------------------------------------------
Associate Professor
Department of Mathematics and Statistics
Calvin College
--------------------------------------------------------

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to