Compatibility of *.dll *.a *.lib *.def between VisualStudio and gcc

后端 未结 4 1835
广开言路
广开言路 2020-12-29 05:15

this is very confusing. I spent a lot of time reading posts on this on stack, etc. Still confused.

I am using Qt and C++ for coding. In Qt, I am using the gcc optio

4条回答
  •  梦谈多话
    2020-12-29 06:06

    question 1: you should import .h file and link .a file by linker command and copy .dll near your .exe output.

    question 2: you can make .a file by .def file

    set PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH%
    
    dlltool.exe -d libfftw3-3.def -l libfftw3-3.a
    

    question 3: no. you can make .def file manually and after make .a file.

    question 4,5: yes

    question 6: I think it is depend on your hardware and operation system not on your compiler.

    question 7: I don't know.

    question 8: you need only .h .a .dll not .def

    question 9: .lib files is for visual studio.

    question 10: no you need .def and .dll to make .lib and you can make . def yourself if you don't have it.

    set PATH=C:\Program Files\Microsoft Visual Studio 12.0\VC\bin;%PATH%
    
    lib /machine:x86 /def:libfftw3-3.def
    

    or

    lib /machine:x64 /def:libfftw3-3.def
    

    Question 11: yes i told you above.

    question 12: yes

    question 13: no.

提交回复
热议问题