Hi Allin,

I find libgretl.h and libgretl.dll in gretl source, so my goal is to compile this source code to generate libgretl.lib to be linked by my C++ app in MSVS2010. Thanks a lot for your links. Looks like I need to first compile gretl source with MinGW, then use Microsoft LIB tool to convert the generated .a file into .lib file so it can be used in MSVS. I'll try to follow instructions outlined by Jack, you and that from those links. Thank you guys very much!

Lake


From: Allin Cottrell <cottrell@wfu.edu>
To: da wang <dawang2002@yahoo.com>; Gretl development <gretl-devel@lists.wfu.edu>
Cc: "r.lucchetti@univpm.it" <r.lucchetti@univpm.it>
Sent: Monday, March 12, 2012 9:54 AM
Subject: Re: [Gretl-devel] where is libgretl.h?

On Mon, 12 Mar 2012, Allin Cottrell wrote:

> On Mon, 12 Mar 2012, da wang wrote:
>
>> Got it Jack, so I will follow your instruction to go to that url and do it the hard way and see whether libgretl.h and libgretl.lib files can be generated. It's a little bit inconvinent because I am not so familiar with compiling with Makefile, but thank you so much!
>
> The libgretl headers (including libgretl.h) don't have to be generated: they're present in the source package.
>
> The supplied gretl Makefile for Windows does not call for generation of a .lib file, but it creates libgretl.dll, libgretl.def, and the import library libgretl.a. You may want to take a look at this discussion [...]

Actually it seems to be simpler than that. From
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs :

<quote>
MSVC cannot use the MinGW library, but since you have already the DEF file you may easily produce one by the Microsoft LIB tool:

lib /machine:i386 /def:testdll.def
</quote>

Allin