Graphviz 2.38.0 compilation using Visual Studio 2010

I have to compile the Graphviz code on Windows platform because I need to integrate 64 bit Graphviz library to a 64 bit windows executable. Hence I am not able to use the 32 bit windows binaries available on the website.

I was not able to compile the code using MINW32 (too many compile errors) - and hence dropped this path. I tried to build the code using VS 2010 and after 2 days was able to build it but with the major restriction that I had to disable LTDL in the config file. Disabling LTDL is useless for me because I am unable to load DOT layout plugin at runtime.

So now I need to figure out how to build Graphviz 64 bit library using LTDL (the problem I am facing now is that I get ltdl.lib NOT found error). the 2.38.0 source code comes with libltdl folder at ROOT - which understandably doesn't have VS project files. So I tried to build that using MingW32 and was able to build BUT the output is again a .a file which I CANT use to link in VS 2010 (because it will need a .lib file). I tried few tricks to convert the .a to .lib but none of them works (perhaps I am doing something wrong).

So my question is basically how can i get a ltdl.lib built that I can use in VS ?

Please help me ...

mingw

Hi Shantanu,

I need static libraries for msys+mingw. Would you be kind enough to post your details steps/make-invocations?

Thanks,

TR

Application running under windows 8.1?

Have you tried running the graphviz 64 bit windows version under windows 8.1?
 

I'll have to check up on

I'll have to check up on this, but I believe we used Visual Studio to build libltdl. Won't that give you both .lib and .dll files?

Finally I can build and use the 64 bit libraries

Hi ... I have managed to build 64 bit library on windows platform using VS2010 and use it. 

In a day or two I will document what all I had to do to accomplish this - so that other users who need to build themselves can benefit from it.

Thanks

 

64 bit libraries

Good to hear that you have solved this problem already. I was running into the same issue today. I am looking forward to your documentation on how to solve this issue.

Many thanks in advance

Martin

 

64 bit ltdl.lib

So here is that I did to create a ltdl.lib that I could use to build Graphviz in Visual Studio. But note that I was only interested in getting dlls for gvc, cdt, cgraph, Pathplan, plugin_core and plugin_dot ...

1) Build $ROOT/libltdl folder using MINGW32
2) Use the options -> ./configure --host=x86_64-w64-ming32 --enable-ltdl-install; make; make install - (This will put a libltdl-7.dll in the .libs folder)
3) Follow https://wiki.videolan.org/GenerateLibFromDll but with /machine:x64 option

VC> lib /def:"$ROOT\graphviz-2.38.0\libltdl\.libs\libltdl-7.def" /out:"$ROOT\graphviz-2.38.0\libltdl\.libs\ltdl.lib" /machine:x64

When you try to link this lib for Graphviz compilation - i think you will get about 6 link errors but those function are deprecated and not used in Graphviz - try to grep those functions and remove them from gvc.def

Also note that I had to define ENABLE_LTDL in few places where for some reason they werent getting picked up with right value used in config.h - so watch out for those.

This is what worked for me and I can't say for sure if this is all you need. Please share the outcome on your side. Look forward to hearing from you ...

 

 

 

 

 

Hi thanks much for the

Hi thanks much for the reply.

If I use Visual Studio 2010 then YES I will be able to get .lib and .dll files with ease.

But the problem for me is that the Graphviz source code - in the $ROOT directory - inside libltdl folder - there is NO VS project file - aka something like in the cmd/dot folder we would find dot.vcproj file which makes VS compilation possible. As such when I open the Graphviz.sln file as mentioned here - http://www.graphviz.org/doc/winbuild.html - I dont see libltdl as a module. This makes VS compilation of liblitdl very difficult for me.

So I am wondering how you used VS studio to build libltdl - if u did then there must be a .vcproj file for it that I can also make use of.

Again the need for me to do all this is so that I can build 64 bit version of libraries. 

Thanks

Recent comments