Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / no resources, then crashes

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. no resources, then crashes
#2530
Posted by: 2003-08-23 10:31:26
I'm using Dev-c++ 4.9.8.2 and the latest mingw (gcc 3.3.1).  I downloaded and installed wxwindows240.devpak, then started a new wxWindows project.  base.h and base.cpp came up and I hit F9. I get various errors, so I download and install libwxmsw241-gcc331.rar (overwriting prior libwxmsw.a file). 

This results in:

Compiler: Default compiler
Building Makefile: "D:Dev-CppwxwMakefile.win"
Executing  make clean
rm -f base.o Project1_private.res Project1.exe

g++.exe -c base.cpp -o base.o -I"D:/Dev-Cpp/include/c++"  -I"D:/Dev-Cpp/include/c++/mingw32"  -I"D:/Dev-Cpp/include/c++/backward"  -I"D:/Dev-Cpp/include" -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__    -Wall

windres.exe -i Project1_private.rc -I rc -o Project1_private.res -O coff

windres.exe: no resources

make.exe: *** [Project1_private.res] Error 1

Execution terminated

I try rebuild all and it compiles (btw, I don't have a "rm" program), but the program crashes when I try to run.

The various errors I got at first were a similar no resources when first run, then a multiple definition error on trying again:

Compiler: Default compiler
Building Makefile: "D:Dev-CppwxwMakefile.win"
Executing  make clean
rm -f base.o  Project2.exe

g++.exe -c base.cpp -o base.o -I"D:/Dev-Cpp/include/c++"  -I"D:/Dev-Cpp/include/c++/mingw32"  -I"D:/Dev-Cpp/include/c++/backward"  -I"D:/Dev-Cpp/include" -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__    -Wall

g++.exe base.o  -o "Project2.exe" -L"D:/Dev-Cpp/lib" -mwindows -lwxmsw -lole32 -lwsock32 -lcomctl32 -lctl3d32 -lgcc -lstdc++ -lshell32 -loleaut32 -ladvapi32 -luuid -lodbc32 

D:/Dev-Cpp/lib/libwxmsw.a(mdi.o)(.data$_ZTV14wxMenuItemList+0x0):mdi.cpp: multiple definition of `vtable for wxMenuItemList'
base.o(.rdata$_ZTV14wxMenuItemList+0x0):base.cpp: first defined here
D:/Dev-Cpp/lib/libwxmsw.a(gdiobj.o)(.data$_ZTV11wxGDIObject+0x0):gdiobj.cpp: multiple definition of `vtable for wxGDIObject'
base.o(.rdata$_ZTV11wxGDIObject+0x0):base.cpp: first defined here

make.exe: *** [Project2.exe] Error 1

Execution terminated

Message2. Re: no resources, then crashes
#2533
Posted by: guidance 2003-08-23 16:06:36
Try this compiler option:
http://g.yi.org/_scripts/file.php?f=424&r=46
Message3. Re: no resources, then crashes
#2534
Posted by: 2003-08-23 19:41:38
One out of two.
Now it compiles with no problem.
But it still crashes immediately.
Message4. Re: no resources, then crashes
#2535
Posted by: guidance 2003-08-23 20:08:22
Then, I suppose you have to build your own wxmsw library. May use this method:
http://g.yi.org/_scripts/file.php?f=2612&r=46
Message5. Re: no resources, then crashes
#2536
Posted by: 2003-08-23 21:11:10
One step ahead of you.   Building my own lib worked
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2023-3-28  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0