MapServer / MapServer-import

3 stars 2 forks source link

C# mapscript not building correctly #1585

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: scottellington@comcast.net Date: 2005/12/21 - 05:23

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();
}
tbonfort commented 12 years ago

Author: szekerest Date: 2005/12/26 - 01:20


This code should be compiled with SWIG-1.3.27 or SWIG-1.3.25.

Is the problem apply to these versions?

Tamas
tbonfort commented 12 years ago

Author: scottellington@comcast.net Date: 2005/12/26 - 01:58

I will test this out when I am back from vacation on the 29th.
tbonfort commented 12 years ago

Author: scottellington@comcast.net Date: 2005/12/30 - 00:47

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).
tbonfort commented 12 years ago

Author: szekerest Date: 2005/12/30 - 02:15


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

Tamas
tbonfort commented 12 years ago

Author: sdlime Date: 2006/01/19 - 04:49

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
tbonfort commented 12 years ago

Author: szekerest Date: 2006/01/21 - 00:10


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