Issues with new install

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
Apharmd
In need of some credit
In need of some credit
Posts: 6
Joined: Tue May 19, 2009 2:08 am
Location: Bo'ness, Scotland

Issues with new install

Post by Apharmd »

Hello again. I used wxDev-C++ a few years ago for a college project, and I'm currently trying to relearn how to use it, as I'm a bit out of practice.

I've just installed the latest version of wxDev-C++, and I'm trying to do the "create a multicolumn table" tutorial on the site.

Whenever I try to compile with even the basic template, the compiler gives a warning that the project is "out of date", and asks if I want to rebuild the project before debugging.

Whether I agree or not, the compiler fails with over 400 "undefined reference" errors. I'm not sure what these errors mean, the first is:
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x7c0):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
I had to install the program outside C:\Program Files as I don't have admin rights to this machine, could that be an issue?
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: Issues with new install

Post by tbreina »

If I understand correctly, you are trying to do a debug build rather than a release build of your project. In that case, you need to link to the debug libraries (assuming you have them installed). So in the Linker section you need to change things like "-lwxmsw29u" to "-lwxmsw29ud" so that the compiler knows to use the "d"ebug compiled libs.

-Tony
Everybody's got something to hide except for me and my monkey.
Apharmd
In need of some credit
In need of some credit
Posts: 6
Joined: Tue May 19, 2009 2:08 am
Location: Bo'ness, Scotland

Re: Issues with new install

Post by Apharmd »

Sorry to bump this up, I was working on something else and didn't get a chance to reply.

I don't know what it meant by debugging, the prompt came up when attempting to compile the program.

I've tried just starting a new wxFrame project. I'm using the Programming with wxDevC++ pdf tutorial to make the HTMLEditor program.

When I get to the first compile in the tutorial, the compiler progress bar gets to the end, then the errors number starts increasing rapidly. The compiler log lists 465 errors:

Code: Select all

[Linker Error] undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
Here's a sample from the log:

Code: Select all

Compiler: Default GCC compiler
Building Makefile: "C:\Users\gxa86158\Documents\Makefile.win"
Executing  make...
mingw32-make.exe -f "Makefile.win" all 
g++.exe "Objects/MingW/HTMLEditorApp.o" "Objects/MingW/HTMLEditorFrm.o" Objects/MingW/HTMLEditor_private.res -o "Output/MingW/HTMLEditor.exe" -L"C:/wxDev-Cpp/lib/wx/gcc_lib" -L"C:/wxDev-Cpp/lib" -mwindows -lwxmsw29u -lwxmsw29u_gl -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 ../../../Dev-Cpp/lib/gcc/mingw32/3.4.2/libgcc.a   

C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x7c0):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0xc3e):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0xe7e):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x32a4):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x33b2):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::assign(wchar_t const*)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x38c0):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'

C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x38f8):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x3930):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x396b):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x39a9):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x3a6a):appbase.cpp: more undefined references to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)' follow

C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x4e56):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::reserve(unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x52ef):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x5309):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x542e):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(unsigned int, wchar_t)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x55c8):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x582a):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x5841):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'

C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x5868):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x622d):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x68a0):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_appbase.o)(.text+0x793c):appbase.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_gdicmn.o)(.text+0x1626):gdicmn.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_mutate(unsigned int, unsigned int, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_gdicmn.o)(.text+0x1f82):gdicmn.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_mutate(unsigned int, unsigned int, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x2136):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x2835):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x52bb):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x60cd):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x678c):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x7d50):mdi.cpp: more undefined references to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)' follow
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x9117):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0x977c):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_mdi.o)(.text+0xa294):mdi.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_window.o)(.text+0x9014):window.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_window.o)(.text+0x92f5):window.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_window.o)(.text+0x94fa):window.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::assign(wchar_t const*, unsigned int)'
C:/wxDev-Cpp/lib/wx/gcc_lib/libwxmsw29u.a(monolib_window.o)(.text+0x9e54):window.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&)'
I've done nothing other than what's instructed in the pdf, and I don't know what's causing so many errors.
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Issues with new install

Post by eranon »

Hello. Did you indicated search path about header files for libs somewhere in your project ? I don't see anything like -I"C:/wxDev-Cpp/Include" in your log
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Apharmd
In need of some credit
In need of some credit
Posts: 6
Joined: Tue May 19, 2009 2:08 am
Location: Bo'ness, Scotland

Re: Issues with new install

Post by Apharmd »

Not sure what you mean.

I tried replacing the #include <wx/wx.h> with the actual path, but it fails now with:

Code: Select all

Compiler: Default GCC compiler
Building Makefile: "C:\wxDev-Cpp\include\common\wx\Makefile.win"
Executing  make...
mingw32-make.exe -f "Makefile.win" all 
g++.exe -c HTMLEditorApp.cpp -o Objects/MingW/HTMLEditorApp.o -I"C:/wxDev-Cpp/include/common/wx" -I"C:/wxDev-Cpp/include" -I"C:/wxDev-Cpp" -D__WXMSW__ -D__GNUWIN32__ -D_UNICODE  

In file included from HTMLEditorApp.cpp:10:
HTMLEditorApp.h:18:20: wx/wx.h: No such file or directory
In file included from HTMLEditorApp.cpp:10:
HTMLEditorApp.h:24: error: expected class-name before '{' token

In file included from HTMLEditorApp.cpp:11:
HTMLEditorFrm.h:20:23: wx/frame.h: No such file or directory
In file included from HTMLEditorApp.cpp:11:
HTMLEditorFrm.h:37: error: expected class-name before '{' token
HTMLEditorFrm.h:39: error: ISO C++ forbids declaration of `DECLARE_EVENT_TABLE' with no type
HTMLEditorFrm.h:42: error: expected `)' before '*' token
HTMLEditorFrm.h:65: error: variable or field `OnClose' declared void
HTMLEditorFrm.h:65: error: expected `;' before '(' token
HTMLEditorApp.cpp:15: error: expected constructor, destructor, or type conversion before "bool"
HTMLEditorApp.cpp:15: error: expected `,' or `;' before "bool"

mingw32-make.exe: *** [Objects/MingW/HTMLEditorApp.o] Error 1

Execution terminated
Compilation Failed. Make returned 2
The reason it's not showing that path is I tried undoing changes, then when that didn't work, starting over. This is from a new attempt at the tutorial program.
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Issues with new install

Post by eranon »

Oh no, I didn't talk about the #include in source, but the -I in build options... But it sounds you already added it...

I don't use wxDev-C++ myself (I'm using Code::Blocks), so I just try to give you what cross my mind as it comes. Well, why do you indicate -L"C:/wxDev-Cpp/lib/wx/gcc_lib" and -L"C:/wxDev-Cpp/lib" ?
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Apharmd
In need of some credit
In need of some credit
Posts: 6
Joined: Tue May 19, 2009 2:08 am
Location: Bo'ness, Scotland

Re: Issues with new install

Post by Apharmd »

Ah, didn't notice that. I think at the time, I was under the impression that indicating -L"C:/wxDev-Cpp/lib" wouldn't include subfolders. Silly of me really.

Also had a little screwup on that last attempt - somehow managed to make the new project inside the /wx/ folder. Thinking that was the problem, I deleted the old project and put a new one where it should be. Fixed that indicating issue too.

Same problem as last post.
Post Reply