User forums > Using Code::Blocks

Building an application which uses dll's

<< < (2/3) > >>

stahta01:

--- Quote from: OldSeaWolf on September 01, 2010, 09:28:29 pm ---

Others
libarithm.dll.a
libinout.dll.a



--- End quote ---

Please remove the others files.

Tim S.

OldSeaWolf:
I removed these two files from Others and here is the log after rebuilding:



-------------- Clean: Debug in main ---------------

Cleaned "main - Debug"

-------------- Build: Debug in main ---------------

mingw32-g++.exe -Wall -fexceptions  -g     -c "C:\samp\gcd_lcm(2)\dynamic_link (CodeBlocks)\main\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe  -o bin\Debug\main.exe obj\Debug\main.o    -larithm.dll -linout.dll
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -larithm.dll
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
1 errors, 0 warnings
 

stahta01:
Add the path to the Linker Search folder to find the library/DLL.

Project Build Options
Tab "search directory"
Sub-Tab "Linker"

Tim S.

OldSeaWolf:
1. What path have I to add: path that contains *.a files (lib<...>.dll.a) or path with real dlls (<...>.dll)?
2. How should I add these paths (I have two dlls)?
Project -> Build Options... -> Search Directories -> Linker -> Add Button ?
Or perhaps I must do this in some other way?

stahta01:

--- Quote from: OldSeaWolf on September 01, 2010, 09:43:28 pm ---Project -> Build Options... -> Search Directories -> Linker -> Add Button ?

--- End quote ---

Correct, add the path to the library/dll file used in the link list.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version