Author Topic: Cannot find lib files to FFTW library in Codebblocs Windows  (Read 834 times)

Offline poorva17

  • Single posting newcomer
  • *
  • Posts: 4
Cannot find lib files to FFTW library in Codebblocs Windows
« 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

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1519
Re: Cannot find lib files to FFTW library in Codebblocs Windows
« Reply #1 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

Offline poorva17

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot find lib files to FFTW library in Codebblocs Windows
« Reply #2 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Cannot find lib files to FFTW library in Codebblocs Windows
« Reply #3 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline poorva17

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot find lib files to FFTW library in Codebblocs Windows
« Reply #4 on: February 03, 2017, 02:25:40 pm »
Yes,Thanks Tim  :)

Offline poorva17

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot find lib files to FFTW library in Codebblocs Windows
« Reply #5 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!!