月份:四月 2010

use VC++ generated DLL files in msys

Posted on Updated on

  1. make your DLL file with export symbols project by VC++, you should have AAA.dll and AAA.lib
  2. to generate libAAA.a for msys or cygwin to use, you should:
    1. generate AAA.def by pexports.exe in msys
      % pexports.exe AAA.dll > AAA.def
    2. generate libAAA.a by dlltool.exe in msys
      % dlltool.exe -D AAA.dll -d AAA.def -l libAAA.a
  3. remember to re-define AAAAPI_EXPORTS as blank which is generated by VC++ in AAA.h as you create the export symbol project.
    #define AAAAPI_EXPORTS __declspec(dllimiport)
    --> #define AAAAPI_EXPORTS
    or you will get the link error:
    error LNK2001: unresolved external symbol __imp__FUNC
  4. 廣告

ffmpeg under Window by Cygwin

Posted on

install Cygwin, mingw
follow document of ffmpeg
when using ffmpeg’s library
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2005-April/000025.html

undefined reference to ‘__stack_chk_fail’

Posted on

root caused:
linked library is made by different version of compiler