Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: kukyakya on October 14, 2009, 04:47:00 pm

Title: path to necessary DLL files when build and run
Post by: kukyakya on October 14, 2009, 04:47:00 pm
it seems that C::B tries to find necessary dll files in the path given in [Project]-[Build options]-[Search directories]-[Linker] but not in [Settings]-[Compiler and debugger]-[Search directories]-[Linker].

it successfully run when i put the path to the directory which contains dlls to project build options but it doesn't run when i put the path to global compiler settings. i don't think it's an intended behavior.

am i doing wrong with it?


Title: Re: path to necessary DLL files when build and run
Post by: oBFusCATed on October 14, 2009, 04:57:36 pm
What is the error?
I think that the linker tries to find libs (*.a or *.lib) not dlls.

Please enable full log and paste it here:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

p.s. this is a developer forum, not user one and you problems is "user problem"
Title: Re: path to necessary DLL files when build and run
Post by: kukyakya on October 14, 2009, 05:12:08 pm
oh i'm sorry about choosing wrong forum.

i have dll version of wxWidgets and put the paths to them in compiler setting.

when i try to build a wxWidgets helloworld project without any project build options, it's successfully built but doesn't run.

Quote
-------------- Build: Debug in test_wxWidget ---------------

mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g    -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu -ID:\devel\boost_1_40_0\stage\include  -c d:\temp\test_wxWidget\test_wxWidgetApp.cpp -o obj\Debug\test_wxWidgetApp.o
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g    -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu -ID:\devel\boost_1_40_0\stage\include  -c d:\temp\test_wxWidget\test_wxWidgetMain.cpp -o obj\Debug\test_wxWidgetMain.o
windres.exe -i d:\temp\TEST_W~1\resource.rc -J rc -o obj\Debug\resource.res -O coff -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu
mingw32-g++.exe -LD:\devel\wxWidgets-2.8.10\lib\gcc_dll -LD:\devel\boost_1_40_0\stage\lib  -o bin\Debug\test_wxWidget.exe obj\Debug\test_wxWidgetApp.o obj\Debug\test_wxWidgetMain.o  obj\Debug\resource.res   -lwxmsw28u  -mwindows
Output size is 658.47 KB
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings

Checking for existence: d:\temp\test_wxWidget\bin\Debug\test_wxWidget.exe
Executing: "d:\temp\test_wxWidget\bin\Debug\test_wxWidget.exe"  (in d:\temp\test_wxWidget\.)
Process terminated with status -1073741515 (0 minutes, 0 seconds)

but when i put the dll path to [Project]-[Build options]-[Search directories]-[Linker], it runs correctly.


Quote
-------------- Build: Debug in test_wxWidget ---------------

mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g    -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu -ID:\devel\boost_1_40_0\stage\include  -c d:\temp\test_wxWidget\test_wxWidgetApp.cpp -o obj\Debug\test_wxWidgetApp.o
mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g    -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu -ID:\devel\boost_1_40_0\stage\include  -c d:\temp\test_wxWidget\test_wxWidgetMain.cpp -o obj\Debug\test_wxWidgetMain.o
windres.exe -i d:\temp\TEST_W~1\resource.rc -J rc -o obj\Debug\resource.res -O coff -ID:\devel\wxWidgets-2.8.10\include -ID:\devel\wxWidgets-2.8.10\lib\gcc_dll\mswu
mingw32-g++.exe -LD:\devel\wxWidgets-2.8.10\lib\gcc_dll -LD:\devel\wxWidgets-2.8.10\lib\gcc_dll -LD:\devel\boost_1_40_0\stage\lib  -o bin\Debug\test_wxWidget.exe obj\Debug\test_wxWidgetApp.o obj\Debug\test_wxWidgetMain.o  obj\Debug\resource.res   -lwxmsw28u  -mwindows
Output size is 658.47 KB
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
 
Checking for existence: d:\temp\test_wxWidget\bin\Debug\test_wxWidget.exe
Executing: "d:\temp\test_wxWidget\bin\Debug\test_wxWidget.exe"  (in d:\temp\test_wxWidget\.)
Process terminated with status 0 (0 minutes, 0 seconds)

The only difference is that the path to the dlls is given in the project build options or not.
Title: Re: path to necessary DLL files when build and run
Post by: oBFusCATed on October 14, 2009, 05:42:08 pm
You need to put the wx dlls in the folder of the exe...