problems compiling with visual studio 2010

199 views
Skip to first unread message

Jeff

unread,
Oct 4, 2010, 2:45:54 PM10/4/10
to link-grammar
Just a heads up to those trying to use visual studio 2010:
1. the regex size_t problem seems to be back. I fixed it by inserting
"typedef unsigned int size_t" in regex.h
2. There's a bug building in directory paths with long names (length >
20 like "C:\link-grammar-4.7\msvc10").
You get a msg something like "not possible to run MSBuild.exe because
it could not be found at "C:\WINDOWS\Microsoft.NET\Framework
\v4.0.30319\MSBuild.exe",
A hotfix is available at:
http://code.msdn.microsoft.com/KB2298853/Release/ProjectReleases.aspx?ReleaseId=4955

Linas Vepstas

unread,
Oct 4, 2010, 11:35:43 PM10/4/10
to link-g...@googlegroups.com
On 4 October 2010 13:45, Jeff <jeffreymi...@gmail.com> wrote:
> Just a heads up to those trying to use visual studio 2010:
> 1. the regex size_t problem seems to be back. I fixed it by inserting
> "typedef unsigned int size_t" in regex.h

size_t is "usually" defined in <stddef.h> -- does windows have this file?

Files like <stdlib.h>, <stdio.h> <string.h> <sys/types.h> and so on all
typically include <stddef.h> because libc uses size_t in much of its API ...

the only file in link-grammar that includes <regex.h> also includes
<sys/types.h> immediately before, which should have taken care of the
size_t problem ... !?!?

Jeff

unread,
Oct 6, 2010, 11:49:20 AM10/6/10
to link-grammar
Windows does have stddef.h which is the 'official' home of size_t;
replacing include <sys/types.h> by include <stddef.h> (or adding
stddef) works, and may be the right solution.

On Oct 4, 11:35 pm, Linas Vepstas <linasveps...@gmail.com> wrote:

Simon J Stuart

unread,
Oct 6, 2010, 11:52:25 AM10/6/10
to link-g...@googlegroups.com
Couldn't agree more! A simple IFDEF could be used to determine if stddef.h
should be included when using VC++2010. It's a simple and elegant
solution... I was actually going to make this suggestion last weekend but we
had a power outage and the message was lost (and I simply forgot once the
power came back on)

Regards,
Simon

--
You received this message because you are subscribed to the Google Groups
"link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to
link-grammar...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/link-grammar?hl=en.

Paul McQuesten

unread,
Oct 6, 2010, 8:36:06 PM10/6/10
to link-grammar
It is not clear to me that #include <stddef.h> should even be
conditional. My (vague and incomplete) read is that code should have
includes for all the names it explicitly mentions, instead of relying
on the library.
~Paul

Linas Vepstas

unread,
Oct 7, 2010, 9:10:18 AM10/7/10
to link-g...@googlegroups.com
On 6 October 2010 10:49, Jeff <jeffreymi...@gmail.com> wrote:
> Windows does have stddef.h which is the 'official' home of size_t;
> replacing include <sys/types.h> by include <stddef.h> (or adding
> stddef)  works, and may be the right solution.


Cool. Done. I'll issue a 4.7.1 which fixes this and a few other minor
niggles in the upcoming weeks.

--linas

Simon J Stuart

unread,
Oct 7, 2010, 3:57:41 PM10/7/10
to link-g...@googlegroups.com
Linas,
That'll be great! I'm looking into the possibility of producing a
makefile/project allowing LGP to be built in Borland C++ (on Windows, of
course) which would be useful to others who prefer it over MSVC++!
Assuming I'm successful, would you like me to send you the files for
committal into the official SVN/releases?

Regards,
Simon

-----Original Message-----
From: link-g...@googlegroups.com [mailto:link-g...@googlegroups.com]

--linas

--

Linas Vepstas

unread,
Oct 7, 2010, 10:21:07 PM10/7/10
to link-g...@googlegroups.com
On 7 October 2010 14:57, Simon J Stuart <kra...@greycascade.com> wrote:
> Linas,
> That'll be great! I'm looking into the possibility of producing a
> makefile/project allowing LGP to be built in Borland C++ (on Windows, of
> course) which would be useful to others who prefer it over MSVC++!
> Assuming I'm successful, would you like me to send you the files for
> committal into the official SVN/releases?

Sure.

If you're speedy, we can get this into 4.7.1

You can pull the latest version from svn if you want to test.

--linas

Reply all
Reply to author
Forward
0 new messages