Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to install XJig on Snow Leopard 10.6.5.

https://sourceforge.net/projects/xjig/

I've installed dependencies using Homebrew but am now getting this error when running make

deepthoughtPro:xjig-2.5-2$ make
c++ -m32 -DUSE_MIT_SHM    -c -o ppm_image.o ppm_image.C
ppm_image.C:7: error: expected declaration before ‘}’ token
make: *** [ppm_image.o] Error 1

The section in the file it is complaining about is:

extern "C" {
#include <ppm.h>
#include <ppmcmap.h>
}

Thanks!

UPDATE - I have now got past this error but am getting a new one:

make

c++ -m32 -DUSE_MIT_SHM  -DJIG_DEFAULT=\"/usr/lib/games/xjig/tina.gif\" -c xjig.C -o xjig.o
c++ -m32 -DUSE_MIT_SHM    -c -o objects.o objects.C
c++ -m32 -DUSE_MIT_SHM    -c -o stack.o stack.C
c++ -m32 -DUSE_MIT_SHM    -c -o imgbuff.o imgbuff.C
c++ -m32 -DUSE_MIT_SHM    -c -o puzzle.o puzzle.C
c++ -m32 -DUSE_MIT_SHM    -c -o real.o real.C
c++ -m32 -DUSE_MIT_SHM    -c -o vec2.o vec2.C
c++ -m32 -DUSE_MIT_SHM    -c -o vec2list.o vec2list.C
c++ -m32 -DUSE_MIT_SHM    -c -o mat2.o mat2.C
c++ -m32 -DUSE_MIT_SHM    -c -o color_mapper.o color_mapper.C
c++ -m32 -DUSE_MIT_SHM    -c -o base_image.o base_image.C
c++ -m32 -DUSE_MIT_SHM    -c -o gif_image.o gif_image.C
c++ -m32 -DUSE_MIT_SHM    -c -o ximage.o ximage.C
c++ -m32 -DUSE_MIT_SHM    -c -o jpeg_image.o jpeg_image.C
rm -f xjig
c++ -m32 -o xjig xjig.o objects.o stack.o imgbuff.o puzzle.o
                   real.o vec2.o vec2list.o mat2.o
                   color_mapper.o base_image.o gif_image.o ximage.o
                   jpeg_image.o -g -O2 -fno-strict-aliasing
  -L/usr/X11/lib -lX11 -ljpeg -lnetpbm -lm     
ld: warning: in /usr/local/lib/libnetpbm.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_XShmCreateImage", referenced from:
      ImageBuffer::AllocData(int, int, int)in imgbuff.o
  "_XShmAttach", referenced from:
      ImageBuffer::AllocData(int, int, int)in imgbuff.o
  "_XShmDetach", referenced from:
      ImageBuffer::FreeData()      in imgbuff.o
  "_XShmPutImage", referenced from:
      ImageBuffer::PutImage(_XDisplay*, unsigned long, _XGC*, int, int, int, int, unsigned int, unsigned int)in objects.o
  "_XShapeQueryVersion", referenced from:
      _main in xjig.o
  "_XShapeCombineMask", referenced from:
      WindowPiece::DirectionChanged()       in objects.o
      WindowPiece::DirectionChanged()       in objects.o
  "_XShmQueryVersion", referenced from:
      ImageBuffer::ImageBuffer()in imgbuff.o
      ImageBuffer::ImageBuffer()in imgbuff.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [xjig] Error 1
share|improve this question

closed as too localized by Kyle Cronin Jan 7 '11 at 7:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This should be moved over to Stackoverflow. –  Philip Regan Jan 6 '11 at 15:07
1  
@Philip Despite the presence of code, this isn't a programming question, so it doesn't belong on Stack Overflow. –  Kyle Cronin Jan 6 '11 at 15:50
1  
However, the scope of this question is too narrow for this site. I suggest you contact Les directly to try to resolve this issue. –  Kyle Cronin Jan 7 '11 at 7:40
add comment

2 Answers 2

I believe that problem has been corrected. The latest source is on www.xjigmanager.com

share|improve this answer
    
It has, but the makefile still doesn't work - it is trying to link to libraries which are not available or configured differently on OSX I think. –  codecowboy Jan 7 '11 at 7:24
add comment

The most likely problem is that the filename extension of capital C .C isn't being interpreted as C++, but as plain C. That would most likely explain the C compiler choking on the C++ extern "C" statement.

Hmm, will post back in a bit (gotta restart for the OS X 10.6.6 update).

share|improve this answer
    
Wouldn't that only be if I was using a case sensitive file system? –  codecowboy Jan 7 '11 at 7:23
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.