News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cannot find lib files to FFTW library in Codebblocs Windows

Started by poorva17, February 02, 2017, 10:35:38 AM

Previous topic - Next topic

poorva17

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

BlueHazzard

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

poorva17

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

stahta01

Quote from: 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

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]


poorva17

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!!