locked
I can't link FreeImage to C#

    Pergunta

  • I built the .dll using the latest release for C#. (build.bat)
    I tried to compile the Main.cs (under the test subdirectory) "csc /reference:FreeImageNET.dll Main.cs" but I got the following errors:
     
    Main.cs(43,15): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_Load'
    Main.cs(45,40): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetColorsUsed'
    Main.cs(47,34): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetBits'
    Main.cs(49,38): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetScanLine'
    Main.cs(51,33): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetBPP'
    Main.cs(53,35): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetWidth'
    Main.cs(55,36): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetHeight'
    Main.cs(57,34): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetLine'
    Main.cs(59,35): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetPitch'
    Main.cs(61,37): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetDIBSize'
    Main.cs(64,21): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetPalette'
    Main.cs(76,43): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetDotsPerMeterX'
    Main.cs(78,43): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetDotsPerMeterY'
    Main.cs(80,29): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetInfoHeader'
    Main.cs(95,21): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetInfo'
    Main.cs(115,39): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetColorType'
    Main.cs(117,37): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetRedMask'
    Main.cs(119,39): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetGreenMask'
    Main.cs(121,38): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetBlueMask'
    Main.cs(123,47): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetTransparencyCount'
    Main.cs(125,47): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetTransparencyTable'
    Main.cs(128,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_SetTransparent'
    Main.cs(130,40): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_IsTransparent'
    Main.cs(134,38): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFileType'
    Main.cs(138,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertTo8Bits'
    Main.cs(141,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertTo16Bits555'
    Main.cs(144,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertTo16Bits565'
    Main.cs(147,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertTo24Bits'
    Main.cs(150,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertTo32Bits'
    Main.cs(153,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ColorQuantize'
    Main.cs(157,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertFromRawBits'
    Main.cs(161,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_ConvertToRawBits'
    Main.cs(163,38): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFCount'
    Main.cs(166,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_SetPluginEnabled'
    Main.cs(168,42): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_IsPluginEnabled'
    Main.cs(171,22): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFormatFromFIF'
    Main.cs(174,43): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFFromFormat'
    Main.cs(176,41): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFFromMime'
    Main.cs(178,46): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFExtensionList'
    Main.cs(180,44): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFDescription'
    Main.cs(182,40): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFRegExpr'
    Main.cs(184,45): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_GetFIFFromFilename'
    Main.cs(186,45): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_FIFSupportsReading'
    Main.cs(188,45): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_FIFSupportsWriting'
    Main.cs(190,47): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_FIFSupportsExportBPP'
    Main.cs(275,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_Save'
    Main.cs(278,3): error CS0117: 'FreeImageAPI.FreeImage' does not contain a
            definition for 'FreeImage_Unload'
     
     
    I hope you can help
    Thanks
    segunda-feira, 6 de março de 2006 08:56

Respostas

  • It looks like you are trying to call methods on the FreeImage class that don't exist, hence the compiletime errors.
    quarta-feira, 7 de junho de 2006 14:18