Code::Blocks Forums

User forums => Help => Topic started by: poorva17 on February 02, 2017, 10:35:38 am

Title: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: poorva17 on February 02, 2017, 10:35:38 am
I have intsalled the FFTW package,but I cannot create the lib files needed by the linker.
How can I do the same?
I am usingCodeblocks in  Windows with MinGW compiler
Title: Re: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: BlueHazzard on February 02, 2017, 11:38:08 am
i have absolutely no idea what you want...

Q: Do you want support on building FFTW?
A: This is the wrong forum to ask

Q: Do you want to build FFTW with codeblocks?
A: Create a project and add all files listed in the makefiles and add all flags listed in the makefile in the corresponding settings

Q: Do you want support on using FFTW libraries in codeblocks?
A: http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_What_do_I_need_to_know_when_using_3rd_party_libs.3F

Q: You get errors during compiling in Codeblocks
A: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
Title: Re: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: poorva17 on February 03, 2017, 11:00:17 am
I found a solution to the problem..If anyone is stuck with the same problem as mine,this can help you..

To generate a static library .a file from .def file for Linux ,Go to command prompt

dlltool -d somedll.def -l libsomedll.a

To generate a static library .lib file from .def file for Windows, Go to command prompt

dlltool -d somedll.def -l libsomedll.lib
Title: Re: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: stahta01 on February 03, 2017, 02:14:18 pm
I found a solution to the problem..If anyone is stuck with the same problem as mine,this can help you..

To generate a static library .a file from .def file for Linux ,Go to command prompt

dlltool -d somedll.def -l libsomedll.a

To generate a static library .lib file from .def file for Windows, Go to command prompt

dlltool -d somedll.def -l libsomedll.lib

FYI: The words "static library" should be replaced by "import library" in the above directions!

Tim S.
Title: Re: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: poorva17 on February 03, 2017, 02:25:40 pm
Yes,Thanks Tim  :)
Title: Re: Cannot find lib files to FFTW library in Codebblocs Windows
Post by: poorva17 on February 14, 2017, 08:47:17 pm
To link an external library in Codeblocks on Windows

Example - FFTW library

1) Download the dll and def files
2) Generate .a and .lib files from the def files using dlltool -d somedll.def -l libsomedll.a and dlltool -d somedll.def -l libsomedll.lib
3) Go to Project->Build options->Linker Settings->Add path to your .a and .lib files
4)Go to Project->Build options->Search Directories->Compiler->Add path to your header file(fftw.h)
5)Go to Project->Build options->Search Directories->Add path to your libraries
In my case C:\Program Files (x86)\CodeBlocks\fftw-3.3.5-dll32

Done!!