Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: skoroglyadov on November 22, 2022, 02:02:13 pm

Title: Linker settings
Post by: skoroglyadov on November 22, 2022, 02:02:13 pm
Good afternoon, I can't figure out where the files from the tab are located: Project -Project build options-Link settings - Link Libraries (with extension .a) ?
Title: Re: Linker settings
Post by: Miguel Gimenez on November 22, 2022, 03:21:27 pm
They should be in a path listed in Search directories -> Linker. If you do not have wxWidgets installed, do so and add the "lib" path to the search directories.
Title: Re: Linker settings
Post by: skoroglyadov on November 22, 2022, 03:51:16 pm
wxWidgets is installed and compiled, the paths are as in the picture.
Title: Re: Linker settings
Post by: skoroglyadov on November 22, 2022, 04:05:43 pm
 Build Log.

g++.exe -LC:\wxWidgets-3.2.1\lib -LC:\MinGW\lib -LC:\wxWidgets-3.2.1\lib\ -LC:\MinGW\lib -o bin\Release\jj.exe obj\Release\jjApp.o obj\Release\jjMain.o  obj\Release\resource.res -s -mthreads  -lwxmsw31_core -lwxbase31 -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -loleacc -luxtheme -mwindows
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31_core
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxbase31
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxpng
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxzlib
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
5 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Title: Re: Linker settings
Post by: Miguel Gimenez on November 22, 2022, 04:37:24 pm
The search path needs gcc_dll or gcc_lib at the end. For dynamic linking:
Code
C:\wxWidgets-3.2.1\lib\gcc_dll
Put the search path only in one place (jj or Release), not in both.
Title: Re: Linker settings
Post by: skoroglyadov on November 22, 2022, 06:59:57 pm
Thank you, it helped.