Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / The wxWindows resource system

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

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. The wxWindows resource system
#2639
Posted by: 2003-09-17 22:58:24
Hi, I'm new.
I've installed wxWindows in Dev-cpp, using devpaks founded here:
http://michel.weinachter.free.fr/
The sample program compiles and runs correctly, but (there's always a but) in the help files i read this:
wxWindows has an optional resource file facility, which allows separation of dialog, menu, bitmap and icon specifications from the application code.

NOTE
: this format is now deprecated in favour of the XML-based XRC resource system.
and so...i was thinking to use XML-based XRC resource, but the sample program doesn't work!
there are not helps to know how compile and run the program under dev-cpp (only VC++ for windows)...

In particular, I've got a lot of linking problems lihe this:
[Linker error] undefined reference to `wxXmlResource::Get()'
any suggestions?
Message2. Re: The wxWindows resource system
#2641
Posted by: guidance 2003-09-18 05:49:31
This means your lib is not xrc enabled, may try this or build your owns: http://g.yi.org/_scripts/file.php?f=2612&r=46
Message3. Re: The wxWindows resource system
#2642
Posted by: mooncake 2003-09-18 20:38:34




Post Edited (09-19-03 07:04)
Meow~
Message4. Re: The wxWindows resource system
#2644
Posted by: 2003-09-18 22:30:34
lot of problems....
I'm trying to follow these passes:
http://g.slyip.com/_scripts/file.php?f=2618&r=46#7944
1) Done
2) Done
3) I'm not sure I really want to do that...I used the WxWindows dev-Pak before..and now I've got much more header files in C:Dev-Cppincludewx
than in C:wxWindows-2.4.1includewx...and so....I think I''ve already all the necessary headers...
4) Done (without -mthreads in compiling and -s in linking)
5) I've included these directories:
    C:wxWindows-2.4.1contribinclude in "include directories"
    C:wxWindows-2.4.1contribsrc in "resources directories"

...nothing...a lot of:
C:/Dev-Cpp/lib/libwxmsw.a(frame.o)(.rdata$_ZTV7wxFrame+0x0):frame.cpp: multiple definition of `vtable for wxFrame'
main.o(.data$_ZTV7wxFrame+0x0):main.cpp: first defined here
C:/Dev-Cpp/lib/libwxmsw.a(menu.o)(.rdata$_ZTV6wxMenu+0x0):menu.cpp: multiple definition of `vtable for wxMenu'
main.o(.data$_ZTV6wxMenu+0x0):main.cpp: first defined here
C:/Dev-Cpp/lib/libwxmsw.a(menu.o)(.rdata$_ZTV14wxMenuItemList+0x0):menu.cpp: multiple definition of `vtable for wxMenuItemList'
main.o(.data$_ZTV14wxMenuItemList+0x0):main.cpp: first defined here
C:/Dev-Cpp/lib/libwxmsw.a(object.o)(.rdata$_ZTV8wxObject+0x0):object.cpp: multiple definition of `vtable for wxObject'
main.o(.data$_ZTV8wxObject+0x0):main.cpp: first defined here
C:/Dev-Cpp/lib/libwxmsw.a(menucmn.o)(.rdata$_ZTV10wxMenuBase+0x0):menucmn.cpp: multiple definition of `vtable for wxMenuBase'
main.o(.data$_ZTV10wxMenuBase+0x0):main.cpp: first defined here
...

PS: before changing the compiling/linking options...the project compiled, but the exe gave me a run-time error after the window appeared...

PPS:sorry for my english...=P
Message5. Re: The wxWindows resource system
#5060
Posted by: hailang_82 2004-09-09 11:24:52
My qns is one yr late
but ... haha

I also got tis problem.
I am using mingw 3.3.1 and dev C++ 4.9.8.10.
wxwidgets 2.5.2.

it gave me an error

[linker error] undefined reference to "vtable of MyFrame".



My friend used wxWidgets and Kdevelop compiling under Suse.
I am trying to copy over to Win XP. But cannot succeed.

Message6. Re: The wxWindows resource system
#6028
Posted by: 2005-04-15 07:46:04
Hi, i'm french and i'm new here.

I try to get wxWidgets working with dev-c++(4.9.9)
So I followed the steps:

***
Download Dev-C++ (at least 4.9.8, which is a version 5 beta) from here.
Download the wxWidgets 2.4.0 and imagelib DevPaks from here.
Install Dev-C++ (self installing .exe).
Install imagelib FIRST, just by double clicking on the downloaded DevPak.
Now the same for the wxWidgets DevPak.
(
There's one mistake in the templates, easy to fix. Note: this has now been fixed in the latest DevPak for wxWidgets (2003-05-16).
Open dev-cpp\Templates\WxWindows.template in a text editor (notepad) and go to the [Project] section.
Copy the line Compiler=--pipe -D...etc and paste just below.
Change pasted line to CppCompiler=--pipe -D.... etc and save the file.
)
Now, load up Dev-C++. file->new->project GUI->wxWidgets. Save in a directory. Compile. Should work perfectly.
 ***

I didn't do the steps between "(" and ")"...

and when I try to compile the sample:

***
mdi.cpp C:\Dev-Cpp\lib\libwxmswu.a(mdi.o)(.data$_ZTV14wxMenuItemList+0x0) multiple definition of `vtable for wxMenuItemList'
main.cpp C:\Documents and Settings\Sirius_Black\Bureau\teta3\main.o(.rdata$_ZTV14wxMenuItemList+0x0) first defined here
 C:\Documents and Settings\Sirius_Black\Bureau\teta3\Makefile.win [Build Error]  [Projet1.exe] Error 1
***

and nothing else is displayed....
so what's the problem?
well, I have a job to do in c++ using windows, so if no one can tell me what the problem is, could you tell me what can I use to easily work with c++ to create windows? (ex: Visual c++ and wxWidgets? or borland c++ and alegro or other librairies)
thx for your help and sorry for my english...

 
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-12-11  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0