User forums > Using Code::Blocks

cant' compile console app after adding wxWidgets paths

(1/2) > >>

art1221:
I can compile wxWidgets apps now, but not console apps. Strange...

paths in Search directories are:

For compiler:

C:\CodeBlocks\MinGW\include
C:\CodeBlocks\MinGW\x86_64-w64-mingw32\include
C:\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\4.8.1\include
C:\wxWidgets3.0.0\include
C:\wxWidgets3.0.0\lib\gcc_dll\mswu
C:\wxWidgets3.0.0\lib\gcc_dll

For linker:

C:\CodeBlocks\MinGW\lib
C:\CodeBlocks\MinGW\x86_64-w64-mingw32\lib
C:\wxWidgets3.0.0\lib\gcc_dll

Build log:

x86_64-w64-mingw32-g++.exe -Wall -fexceptions  -O2  -std=c++11 -w -m64   -IC:\CodeBlocks\MinGW\include -IC:\CodeBlocks\MinGW\x86_64-w64-mingw32\include -IC:\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\4.8.1\include -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu -IC:\wxWidgets3.0.0\lib\gcc_dll  -c C:\_C++\PROJECTS\Films\BoostFunc.cpp -o obj\Release\BoostFunc.o
                                ^

BlueHazzard:
1) Use code tags for this type of info
2) post the full build log in yours the error is missing

ollydbg:
Read How do I troubleshoot a compiler problem?

art1221:
path to boost has been deleted and that have produced the first error. Now after adding Boost to compiler and linker settings I am getting quite different error. I have never used c-tags... yet....


x86_64-w64-mingw32-g++.exe -LC:\CodeBlocks\MinGW\lib -LC:\CodeBlocks\MinGW\x86_64-w64-mingw32\lib -LC:\wxWidgets3.0.0\lib\gcc_dll -LC:\Boost\lib  -o bin\Release\TEST.exe obj\Release\Derrick_Catalog.o obj\Release\EmuleFolder.o obj\Release\Files_Dirs.o obj\Release\main.o obj\Release\Menu.o obj\Release\Strings.o obj\Release\TextProccessing.o obj\Release\Utils.o  obj\Release\FilmInfo.res  -s -Wl,--allow-multiple-definition  
c:/codeblocks/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: obj\Release\Derrick_Catalog.o: bad reloc address 0x166 in section `.text.startup'
collect2.exe: error: ld returned 1 exit status

stahta01:
http://cboard.cprogramming.com/c-programming/announcement-posting-code-read-first.html

I suggest Posting the full Build log in code tags or you will likely be ignored.

This means do a re-build instead of a build.
This means use code tags!

My full rebuild log


--- Code: ----------------- Build: Release in console_wx30 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pipe -mthreads -Wno-attributes -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IE:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\include -IE:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\lib\gcc_dllmulti_mgw481_wx30\mswu -c E:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\samples\console\console.cpp -o .objs\Release\console\console.o
mingw32-g++.exe -LE:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\lib\gcc_dllmulti_mgw481_wx30 -o bin\Release\console.exe .objs\Release\console\console.o  -s -mthreads -lwxbase30u -lwxmsw30u_core -lwxmsw30u_adv  
Output file is bin\Release\console.exe with size 526.00 KB

--- End code ---

Notice I linked to the wxWidgets base library "-lwxbase30u"; I have no idea if console libs can be built linking to monolithic DLL. It does work with Monolib.
These libs are not likely needed "-lwxmsw30u_core -lwxmsw30u_adv".

The run command below.

--- Code: ----------------- Run: Release in console_wx30 (compiler: GNU GCC Compiler)---------------

Checking for existence: E:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\samples\cb_build\bin\Release\console.exe
Executing: "C:\GreenApps\CB_UOI_9398/cb_console_runner.exe" "E:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\samples\cb_build\bin\Release\console.exe"  (in E:\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-3.0.x-MonoLib-SJLJ\samples\cb_build\.)

--- End code ---

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version