Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Newbie: Problems compiling wxWindows sample

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

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Newbie: Problems compiling wxWindows sample
#2567
Posted by: 2003-08-27 06:21:07
Hi,

when I try to compile the "HelloWorldApp.cpp" (wxTutorial, Chapter 2), I?ll get following error:

In file included from C:/Dev-Cpp/include/wx/wxprec.h:13,
                 from E:/WxTutorial/Chapter 2/HelloWorldApp.cpp:1:
C:/Dev-Cpp/include/wx/defs.h:174: redeclaration of C++ built-in type `bool'

In file included from C:/Dev-Cpp/include/wx/memory.h:20,
                 from C:/Dev-Cpp/include/wx/object.h:25,
                 from C:/Dev-Cpp/include/wx/wx.h:16,
                 from E:/WxTutorial/Chapter 2/HelloWorldApp.cpp:4:
C:/Dev-Cpp/include/wx/string.h:164:4: #error "Please define string case-insensitive compare for your OS/compiler"
In file included from E:/WxTutorial/Chapter 2/HelloWorldApp.cpp:7:
E:/WxTutorial/Chapter 2/HelloWorldApp.h:14:8: warning: extra tokens at end of #endif directive
What do I have to do?

I am using (file name): devcpp4980, wxWindows240.DevPak, imagelib-2.DevPak

Greetz,

Pete
Message2. Re: Newbie: Problems compiling wxWindows sample
#2569
Posted by: guidance 2003-08-27 06:37:02
Try these options: http://g.yi.org/f.php?f=157
Message3. Re: Newbie: Problems compiling wxWindows sample
#2593
Posted by: 2003-09-01 23:38:14
If you installed wxWindows by using DevPak:

There's one mistake in the templates, easy to fix.
1.  Open dev-cppTemplatesWxWindows.template in a text editor (notepad) and go to the [Project] section.
2.  Copy the line Compiler=--pipe -D...etc and paste just below.
3.  Change pasted line to CppCompiler=--pipe -D.... etc and save the file. 

Now, load up Dev-C++. file->new->project GUI->wxWindows.
Save in a directory. Compile. Should work perfectly
Message4. Re: Newbie: Problems compiling wxWindows sample
#2693
Posted by: 2003-10-03 14:49:32
I also tried the above and it does not work

Why do we have to paste
Compiler=--pipe -D...etc
then change to
CppCompiler=--pipe -D.... etc

can't we just paste the last statement straight away.

when I add a space between -D.... and etc
I get the following

"can not specify-o with -c or -S and multiple compilation"

then I deleted the space thru "Project option-> parameter", I got all these messages.

Thanks
ABCHUNG
Message5. Re: Newbie: Problems compiling wxWindows sample
#2695
Posted by: 2003-10-04 02:14:20
I'm having similar problems. All I have done is create wxWindows project (New->Project, GUI->wxWindows) and hit run. These are the errors I am getting:

In file included from c:/progfile/wxWindows/include/wx/defs.h:23,
                 from c:/progfile/wxWindows/include/wx/wxprec.h:13,
                 from Untitled1.cpp:11:
c:/progfile/wxWindows/include/wx/platform.h:85:22: wx/setup.h: No such file or directory
In file included from c:/progfile/wxWindows/include/wx/platform.h:88,
                 from c:/progfile/wxWindows/include/wx/defs.h:23,
                 from c:/progfile/wxWindows/include/wx/wxprec.h:13,
                 from Untitled1.cpp:11:
Message6. Re: Newbie: Problems compiling wxWindows sample
#2696
Posted by: guidance 2003-10-04 13:40:53
Try this precompiled library:
http://g.yi.org/f.php?f=2618#4181
Message7. Re: Newbie: Problems compiling wxWindows sample
#2709
Posted by: 2003-10-08 04:17:03
Thanks. That was a big help. It took me a while (busy doing other stuff too), but I got it to compile... partially. Its not linking now:

Untitled1.o(.text+0xc):Untitled1.cpp: undefined reference to `wxFrame::sm_eventTable'
Untitled1.o(.text+0x32):Untitled1.cpp: undefined reference to `wxAppBase::CheckBuildOptions(wxBuildOptions const&)'
Untitled1.o(.text+0x43):Untitled1.cpp: undefined reference to `wxApp::wxApp()'

And plenty more of this (417 total). Any ideas what I missed?
Message8. Re: Newbie: Problems compiling wxWindows sample
#2710
Posted by: guidance 2003-10-08 07:26:58
setup.h copied? and delete other setup.h in other directories.
Message9. Re: Newbie: Problems compiling wxWindows sample
#2713
Posted by: 2003-10-08 12:20:32
My bad. In all the installs and reinstalls I lost the reference to the correct folder somewhere. I have it working now.

Now I get to try to repeat my performance on my home computer...

Thanks for all the help.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-12-14  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0