Page 1 of 1

i found error?

Posted: Tue Aug 24, 2010 11:19 am
by midisa
I build and run the application. I do not know then, but the application stopped running.
I think that the program can not create a directory in the directory Debug. In the Debug directory are files with extension *. o, but no executable file.

Please let me know. It's my mistake or a mistake of the program?
This is the text of the program:

---------- Build Started --------
/ Bin / sh-c '"make"-j 8-f "test_wsp.mk"'
---------- Building project: [myfirst - Debug ]----------

Warning: No config found to match: / usr / local / bin / wx-config - cxxflags - unicode = yes - debug = yes
in / usr / local / lib / wx / config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config - list to see all configs available in
the default prefix.


Warning: No config found to match: / usr / local / bin / wx-config - debug = yes - libs - unicode = yes
in / usr / local / lib / wx / config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config - list to see all configs available in
the default prefix.

make [1]: Entering directory `/ home / midisa / Projects / test / myfirst '
g-c "/ home / midisa / Projects / test / myfirst / gui.cpp"-g-D__WX__-D__WXGTK__-o. / Debug / gui.o "-I." "-I/usr/local/include/wx-2.8" "-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8" "-I/usr/include/wx-2.8"
g-c "/ home / midisa / Projects / test / myfirst / main.cpp"-g-D__WX__-D__WXGTK__-o. / Debug / main.o "-I." "-I/usr/local/include/wx-2.8" "-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8" "-I/usr/include/wx-2.8"
g-o. / Debug / myfirst. / Debug / gui.o. / Debug / main.o "-L." "-L/usr/local/lib"-Mwindows
. / Debug / gui.o: In function `MainFrameBase ':
/ Home / midisa / Projects / test / myfirst / gui.cpp: 12: undefined reference to `wxFrameNameStr '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 14: undefined reference to `wxDefaultSize '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 14: undefined reference to `wxDefaultSize '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 14: undefined reference to `wxDefaultSize '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 16: undefined reference to `wxMenuBar:: wxMenuBar (long) '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 19: undefined reference to `operator (wxString const &, wchar_t) '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 19: undefined reference to `operator (wxString const &, wchar_t const *) '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 19: undefined reference to `wxEmptyString '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 19: undefined reference to `wxMenuItem:: wxMenuItem (wxMenu *, int, wxString const &, wxString const &, wxItemKind, wxMenu *) '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 24: undefined reference to `wxFrameBase:: SetMenuBar (wxMenuBar *) '
/ Home / midisa / Projects / test / myfirst / gui.cpp: 27: undefined reference to `wxBoxSizer:: wxBoxSizer (int) '

... deleted a lot of text ....

. / Debug / main.o: (. Rodata._ZTV7MainApp [vtable for MainApp] 0x158): undefined reference to `wxAppBase:: OnExceptionInMainLoop () '
. / Debug / main.o: (. Rodata._ZTV7MainApp [vtable for MainApp] 0x168): undefined reference to `wxAppBase:: GetTopWindow () const '
. / Debug / main.o: (. Rodata._ZTV7MainApp [vtable for MainApp] 0x170): undefined reference to `wxAppBase:: GetDisplayMode () const '
. / Debug / main.o: (. Rodata._ZTV7MainApp [vtable for MainApp] 0x188): undefined reference to `wxAppBase:: GetLayoutDirection () const '
. / Debug / main.o: (. Rodata._ZTV7MainApp [vtable for MainApp] 0x190): undefined reference to `wxAppBase:: SetActive (bool, wxWindow *) '
. / Debug / main.o: (. Rodata._ZTI7MainApp [typeinfo for MainApp] 0x10): undefined reference to `typeinfo for wxApp '
. / Debug / main.o: In function `~ MainApp ':
/ Home / midisa / Projects / test / myfirst / main.h: 27: undefined reference to `wxApp:: ~ wxApp () '
/ Home / midisa / Projects / test / myfirst / main.h: 27: undefined reference to `wxApp:: ~ wxApp () '
collect2: ld returned 1 exit status
make [1]: *** [Debug / myfirst] Error 1
make [1]: Leaving directory `/ home / midisa / Projects / test / myfirst '
make: *** [All] Error 2
---------- Build Ended ----------
0 errors, 0 warnings

Re: i found error?

Posted: Tue Aug 24, 2010 1:52 pm
by DavidGH
Hi,
Warning: No config found to match: /usr/local/bin/wx-config - cxxflags - unicode=yes - debug=yes
This means what it says: your project build is asking the wx-config script (installed to /usr/local/bin) for a unicode debug version of wxGTK. There isn't a unicode debug build available.

Only you know how you configured wxGTK, but you can find out what's available by doing, in a terminal:
/usr/local/bin/wx-config --list

Then change your project settings to match (or else make another wxGTK build). You can change easily from 'Debug' to 'Release' using the 'choice' at the top of the Workspace View, which by default is set to 'Debug'. This is mentioned near the bottom of http://codelite.org/LiteEditor/QuickStart.

Regards,

David

Re: i found error?

Posted: Tue Aug 24, 2010 3:22 pm
by midisa
I do not understand what you said. I do not know English, and an electronic translator translates very badly. I will give you information. I think what you are talking about it.

----------------------------------------

$ /usr/local/bin/wx-config --list
Default config is gtk2-unicode-release-2.8
Default config will be used for output
Alternate matches:
gtk2-ansi-release-2.8
gtk2-unicode-release-static-2.8
------------------------------------------------------
I am doing a project on the steps. All as described here.

http://codelite.org/LiteEditor/QuickStart

Re: i found error?

Posted: Tue Aug 24, 2010 8:13 pm
by DavidGH
That says that you have a 'release' build of wxGTK. So you need to set your project to build in 'release'. Look at http://codelite.org/LiteEditor/QuickSta ... oWorld.jpg. On the left, below 'Selected Configuration', it says Debug. Change that to Release

Re: i found error?

Posted: Tue Aug 24, 2010 9:55 pm
by midisa
if select release all ok.
if select debug this error.

please help me setup this editor. Guiding my actions, so that I can configure the editor.

Re: i found error?

Posted: Wed Aug 25, 2010 12:14 am
by DavidGH
please help me setup this editor
You just did! Switch to 'Release' and it works.

If you want your app to build in Debug mode, you need a debug build of wxGTK. That means configuring wxGTK with the --enable-debug option and building again.

Re: i found error?

Posted: Wed Sep 01, 2010 10:36 am
by midisa
i compile wxWidget with parametr:
./configure --enable-unicode --enable-debug
make
sudo make install


but present this error again. please help me.

----------Build Started--------
/bin/sh -c '"make" -j 2 -f "Library_wsp.mk"'
----------Building project:[ Library - Debug ]----------
make[1]: Вход в каталог `/home/midisa/NetBeansProjects/Library'
g++ -c "/home/midisa/NetBeansProjects/Library/gui.cpp" -g -I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread -D__WX__ -D__WXGTK__ -o ./Debug/gui.o "-I." "-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8" "-I/usr/local/include/wx-2.8"
g++ -c "/home/midisa/NetBeansProjects/Library/main.cpp" -g -I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread -D__WX__ -D__WXGTK__ -o ./Debug/main.o "-I." "-I/usr/local/lib/wx/include/gtk2-unicode-release-2.8" "-I/usr/local/include/wx-2.8"
g++ -o ./Debug/Library ./Debug/gui.o ./Debug/main.o "-L." "-L/usr/local/lib" -mwindows -L/usr/local/lib -pthread -lwx_gtk2ud_richtext-2.8 -lwx_gtk2ud_aui-2.8 -lwx_gtk2ud_xrc-2.8 -lwx_gtk2ud_qa-2.8 -lwx_gtk2ud_html-2.8 -lwx_gtk2ud_adv-2.8 -lwx_gtk2ud_core-2.8 -lwx_baseud_xml-2.8 -lwx_baseud_net-2.8 -lwx_baseud-2.8
./Debug/gui.o: In function `wxStringBase':
/usr/local/include/wx-2.8/wx/string.h:352: undefined reference to `wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'
./Debug/main.o:(.rodata._ZTV7MainApp[vtable for MainApp]+0x120): undefined reference to `wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*)'
./Debug/main.o:(.rodata._ZTV7MainApp[vtable for MainApp]+0x128): undefined reference to `wxAppConsole::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)'
collect2: ld returned 1 exit status
make[1]: *** [Debug/Library] Error 1
make[1]: Выход из каталога `/home/midisa/NetBeansProjects/Library'
make: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings

Re: i found error?

Posted: Wed Sep 01, 2010 2:12 pm
by DavidGH
undefined reference to `wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)'
The happens when you accidentally mix 'debug' and 'release' libraries.

Try doing 'make clean' to your project, then build it again.

If that doesn't help, I suggest that you uninstall wxGTK from /usr/local and install it away from the 'release' libraries. I do this by keeping them under the wx build directory:

Code: Select all

cd </path/to/your/wxGTK-source>
mkdir udb
cd udb
../configure --enable-unicode --enable-debug --prefix=$(pwd)
make
(Note the '..' before configure)
You don't need to 'make install'. The debug libraries will now be in /path/to/your/wxGTK-source/udb/lib, and there will be a wx-config in /path/to/your/wxGTK-source/udb that points to them.

To build in 'debug', you point to that wx-config. The way to do this in CodeLite is described in http://codelite.org/LiteEditor/ProjectSettings (search for /path/to/desired/wx-config). You will need to change both the 'Compiler' and 'Linker' tabs.

Re: i found error?

Posted: Wed Sep 01, 2010 3:52 pm
by midisa
Thank you. I have all turned out well. I did not know what the library to collect.
First, I collected a library wxAll. I have been an error.
Then I gathered a library wxGTK. Errors disappeared.

Thanks for your help. I will have many questions on this editor. Editor interesting. Other questions I'll create a new forum thread.

Thanks again.