#### Archived

This topic is now archived and is closed to further replies.

# Compiling Insight on Cygwin

This topic is 5025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

This isn''t exactly a unix question, seeing as I''m using Cygwin on windows, but anyway.. I downloaded and installed cygwin and then followed the instructions here to compile Insight. However when I run make I get an error:
file=./''echo fr | sed ''s,.*/,,''.gmo \
&& rm -f $file && PATH=../src:$PATH msgfmt -o \$file fr.po
make[3]: *** [fr.gmo] Error 127

Does anyone know what might be causing this or how I could fix it?

##### Share on other sites
I''ve now worked it out, I had to install the gettext-devel package for cygwin and it appears to be all working now

##### Share on other sites
Hmm got another problem now, the error this time is

../generic/tclCmdAH.c: In Function ''Tcl_FileObjCmd'':../generic/tclCmdAH.c:670: error: syntax error before numeric constant 

Here''s the offending line (well lines) in tclCmdAH.c

enum {FILE_ATIME, FILE_ATTRIBUTES, FILE_COPY, FILE_DELETE, FILE_DIRNAME,	FILE_EXECUTABLE, FILE_EXISTS, FILE_EXTENSION, FILE_ISDIRECTORY,	FILE_ISFILE, FILE_JOIN, FILE_LSTAT, FILE_MTIME, FILE_MKDIR,	FILE_NATIVENAME, FILE_OWNED, FILE_PATHTYPE, FILE_READABLE,	FILE_READLINK, FILE_RENAME, FILE_ROOTNAME, FILE_SIZE, FILE_SPLIT,	FILE_STAT, FILE_TAIL, FILE_TYPE, FILE_VOLUMES, FILE_WRITABLE}; `

Which looks fine to me, anybody got any ideas of how to fix it?

##### Share on other sites
Is something else defining one of those enumeration constants? I don''t know much about Tcl (which I presume is what that source file is part of), but if it''s including any Windows headers (for whatever reason) I know that at least one of those constants is already used as a macro constant.

##### Share on other sites
Well I did a find in files searching all of the insight source stuff I got from cvs, looking for one of the enumeration constansts and it only found it in two places. One of them is that enum and the other is in the same function the enum is in.

If one''s being used as a macro that''s probably the problem, it''s getting replaced with the macro. Which one is it? Because seeing as it looks like they''re only being used in two places I could rename it and see if it works.

##### Share on other sites
Right I put a 2 on all the constants on the second line (which is line 670) and made the appropiate changes elsewhere in the file and the compilation now seems to be running fine, hopefully this''ll be the last error, thanks for the help

##### Share on other sites
An alternative is to place the following before the enum originally found at line 669 of tclCmdAH.c:

#if __WIN32__
#undef FILE_EXISTS
#endif

Apparently FILE_EXISTS is defined in WIN32, and someone forgot to actually do a WIN32 build test on this release, which would have discovered this flaw.

• 10
• 18
• 13
• 10
• 12