igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Building igraph 0.6 rev 1601 with msvc9


From: Tamas Nepusz
Subject: Re: [igraph] Building igraph 0.6 rev 1601 with msvc9
Date: Tue, 4 Aug 2009 10:13:52 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

Hi Chris,

Hmm, I'm not very familiar with Windows debugging either. Can you obtain
a full stack dump somehow at the point where the application crashed?
Does it also happen with graph or edge attributes? Are you sure that
your application is loading the rebuilt libxml2 instead of the original
one? (It can cause problems when you use one version of a DLL when
_building_ the app and another one when _running_ it, especially if the
ABI changed in the meanwhile).

-- 
Tamas

On Mon, Aug 03, 2009 at 08:01:20PM -0400, Chris Wj wrote:
> Hmm. It seems like this is a problem with reading any graphml with custom
> attributes. I can read and write simple graphs in graphml and gml. It always
> fails when I read a file with vertex attributes.
> 
> What I did was generate a graph, give it vertex attributes, write it to
> disk, and then try to read it back in from the file.
> 
> On Mon, Aug 3, 2009 at 7:51 PM, Chris Wj <address@hidden> wrote:
> 
> > After rebuilding with libxml2, the igraph.Graph.Read_GraphML (Python) call
> > results in an application crash.
> >
> > I get an "Access violation reading location ..." in ntdll.dll
> >
> > I rebuilt libxml2 from scratch with msvc9 first.
> >
> > And I was so close... other things seem to be working as I can create
> > graphs and whatnot.
> >
> >
> >
> > On Mon, Aug 3, 2009 at 4:14 PM, Chris Wj <address@hidden> wrote:
> >
> >> I added #include "igraph_math.h" to foreign-ncol-parser.c,
> >> foreign-lgl-parser.c, bliss_bignum.hh, and centrality.c
> >>
> >> Also added the definition for igraph_i_snprintf under the
> >> '#ifdef _MSC_VER' and after  '#define snprintf igraph_i_snprintf'
> >>
> >> All dependencies resolved... NICE!
> >>
> >>
> >> On Sat, Aug 1, 2009 at 9:23 PM, Chris Wj <address@hidden> wrote:
> >>
> >>> Ok I spoke too soon.
> >>>
> >>> From: 
> >>> http://msdn.microsoft.com/en-us/library/cx3b23a3(VS.80).aspx<http://msdn.microsoft.com/en-us/library/cx3b23a3%28VS.80%29.aspx>
> >>>
> >>> C Language Reference
> >>> Inline Functions
> >>>
> >>>  *Microsoft Specific*
> >>>
> >>> The *__inline* keyword tells the compiler to substitute the code within
> >>> the function definition for every instance of a function call. However,
> >>> substitution occurs only at the compiler's discretion. For example, the
> >>> compiler does not inline a function if its address is taken or if it is 
> >>> too
> >>> large to inline.
> >>>
> >>> For a function to be considered as a candidate for inlining, it must use
> >>> the new-style function definition.
> >>>
> >>> Just make sure that jives with what you want, especially that "at the
> >>> compiler's discretion" part.
> >>>
> >>>
> >>> On Sat, Aug 1, 2009 at 9:20 PM, Chris Wj <address@hidden> wrote:
> >>>
> >>>> From 
> >>>> http://msdn.microsoft.com/en-us/library/z8y1yy88(VS.80).aspx<http://msdn.microsoft.com/en-us/library/z8y1yy88%28VS.80%29.aspx>
> >>>>
> >>>> The *inline* keyword is available only in C++. The *__inline* and *
> >>>> __forceinline* keywords are available in both C and C++. For
> >>>> compatibility with previous versions, *_inline* is a synonym for *
> >>>> __inline*.
> >>>>
> >>>> That's the C++ documentation. They don't even mention __inline in the C
> >>>> documentation part.
> >>>>
> >>>>
> >>>> On Sat, Aug 1, 2009 at 9:12 PM, Chris Wj <address@hidden> wrote:
> >>>>
> >>>>> Thanks for the updates Tamas, they will help out. There were a few
> >>>>> other files missing from the msvc project that I added. They were 
> >>>>> relatively
> >>>>> easy to pick out through trial and error though. I'll post/upload the
> >>>>> project file when I have the last unresolved symbol figured out.
> >>>>>
> >>>>> Yeah, while inline is a C99 standard keyword it seems like in MSVC only
> >>>>> C++ recognizes inline, but C recognizes __inline. After a quick web 
> >>>>> search,
> >>>>> it looks like many others had this issue too. They basically did the 
> >>>>> same
> >>>>> thing you did to redefine inline to __inline. I'd still like to know 
> >>>>> why!
> >>>>>
> >>>>>
> >>>>> On Sat, Aug 1, 2009 at 4:11 PM, Tamas Nepusz <address@hidden> wrote:
> >>>>>
> >>>>>>  Hi guys. I just built igraph 0.6 from bzr rev 1601 on Windows with
> >>>>>>> msvc9 (VS 2008). I had to make changes in 2 files:
> >>>>>>>
> >>>>>> Fixed as well -- added M_SQRT2 to igraph_math.h and included it from
> >>>>>> src/centrality.c. I'm not sure about the inline stuff -- I thought that
> >>>>>> inline is a valid C keyword, but it looks like we have to live with a
> >>>>>> compiler-related hack here. Something like:
> >>>>>>
> >>>>>> #if defined(_MSC_VER)
> >>>>>> #  define inline __inline
> >>>>>> #endif
> >>>>>>
> >>>>>> I added the above code snippet to src/heap.c, hope this helps.
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Tamas
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> igraph-help mailing list
> >>>>>> address@hidden
> >>>>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >

> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

[Prev in Thread] Current Thread [Next in Thread]