Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1585 closed defect (wontfix)

C# mapscript not building correctly

Reported by: scottellington@… Owned by: sdlime
Priority: high Milestone:
Component: MapScript Version: 4.6
Severity: blocker Keywords:
Cc:

Description

The c# mapscript module is not building correctly for me.  Here is the error:

scottell@arroyo ~/sandbox/mapserver-4.8.0-beta3/mapscript/csharp $ make
/usr/bin/swig -csharp -o mapscript_wrap.c ../mapscript.i

gcc -fpic -c -DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_TIFF -DUSE_JPEG -DUSE_GD_TTF
-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DGD_HAS_GDIMAGEGIFPTR
mapscript_wrap.c
gcc -fpic -shared mapscript_wrap.o -o libmapscript.so -L../.. -lmap -lgd
-L/usr/local/lib -lgd -ljpeg -lttf -lpng -lz -ltiff -ljpeg -lpng -lz -ljpeg -lm
mcs /t:library /out:mapscript_csharp.dll *.cs
syntax error, got token `ERROR'
imageObj.cs(104,12): error CS1002: Expecting `;'
Compilation failed: 1 error(s), 0 warnings
make: *** [mapscript_csharp] Error 1

This is on Gentoo Linux with mono 1.1.10 and swig-1.3.21.  Both 4.6.2 and 4.8.0 
are failing like this, but 4.6.0 builds fine.  I'm no expert on SWIG, but it
looks like it is creating bad code, the error above points to:

  public byte[] getBytes() {
    mapscriptPINVOKE.imageObj_getBytes(swigCPtr);
    return $modulePINVOKE.GetBytes();
}

Change History (6)

comment:1 by szekerest, 18 years ago

Cc: szekeres.tamas@… added
This code should be compiled with SWIG-1.3.27 or SWIG-1.3.25.

Is the problem apply to these versions?

Tamas

comment:2 by scottellington@…, 18 years ago

I will test this out when I am back from vacation on the 29th.

comment:3 by scottellington@…, 18 years ago

Ok. swig-1.3.25 worked for me.  It would be nice if a configure script could
catch that, or at least log that in the Makefile (or a README).

comment:4 by szekerest, 18 years ago

I recommend to use the latest swig release since there were major changes in 
the C# generator.



Tamas

comment:5 by sdlime, 18 years ago

Resolution: wontfix
Status: newclosed
Perhaps someone a bit more knowledgable than myself could author a README on
building mapscript for C#? I'd be willing to install it in the distribution.

Marking this as a WONTFIX for now.

Steve

comment:6 by szekerest, 18 years ago

Steve,

I have also experienced a gap in the C# topic. If I aim at writing this how to
make it available for the others?

Tamas


Note: See TracTickets for help on using tickets.