To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

http://justlinux.com/   Mon, 06-Sep-2010 01:49:59 GMT
         internet.com

Go Back   JustLinux Forums > Community Help: Check the Help Files, then come here to ask! > Programming/Scripts

Programming/Scripts Perl, Python, C/C++, Java, CGI, shell, etc. Share your code!

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-30-2003, 01:45 AM
Sepero's Avatar
Sepero Sepero is offline
Modurator Wannabe
 
Join Date: Mar 2003
Location: Tampa, FL USA
Posts: 2,193
wxWindows + Debian = C++ learning headaches!

Ok, to begin with, this is Not the first place I came. I searched Google again and again, this forum, and I searched the wxWindows website as well.

The first problem was figuring out that I had to find "/usr/lib/wx/include/gtk-2.4/wx/setup.h" and copy it to "/usr/include/wx/setup.h". Now that I've done that, I can't seem to get any further. I've searched the wxWindows website to no avail.

Keep in mind, I'm a mid-grade Java programmer learning C++. My program wxTest.cpp
Code:
#include <iostream>
#include <wx/wx.h>

int main()
{
  return 0;
}
And where the errors start.
Code:
In file included from /usr/include/wx/wx.h:15,
                 from wxTest.cpp:2:
/usr/include/wx/defs.h:32:2: #error "No Target! You should use wx-config program for compilation flags!"
In file included from /usr/include/wx/intl.h:24,
                 from /usr/include/wx/wx.h:21,
                 from wxTest.cpp:2:
/usr/include/wx/fontenc.h:131:6: #error "Unsupported toolkit"
In file included from /usr/include/wx/gdicmn.h:29,
                 from /usr/include/wx/event.h:24,
                 from /usr/include/wx/wx.h:23,
                 from wxTest.cpp:2:
/usr/include/wx/font.h:82: error: parse error before `{' token
/usr/include/wx/font.h:104: error: non-member function `bool Ok()' cannot have 
   `const' method qualifier
...
If I need to give anymore information, please tell me! Step by step instructions would be greatly appreciated.


P.S.
I've attached the full error list if anyone cares to read it.
Attached Files
File Type: txt wxtest.txt (18.2 KB, 150 views)
Reply With Quote
  #2  
Old 06-30-2003, 09:39 AM
Stuka Stuka is offline
Registered User
 
Join Date: Jun 2000
Location: Houston, TX, USA
Posts: 1,290
Have you looked at the wxWindows documents for compilation? Many GUI toolkits give you good directions on compiling for a given environment (or, even better, offer tools like pkg-config).
__________________
"I'm not closed-minded, you're just wrong" - Bucky Katt
Reply With Quote
  #3  
Old 07-01-2003, 01:58 AM
Sepero's Avatar
Sepero Sepero is offline
Modurator Wannabe
 
Join Date: Mar 2003
Location: Tampa, FL USA
Posts: 2,193
I did read the documents about compiling the library, but I didn't compile it. I downloaded and installed the v2.4 library with aptitude. I'm using the "testing" version of Debian.
Reply With Quote
  #4  
Old 07-01-2003, 10:42 AM
Stuka Stuka is offline
Registered User
 
Join Date: Jun 2000
Location: Houston, TX, USA
Posts: 1,290
Re: wxWindows + Debian = C++ learning headaches!

Quote:
Originally posted by Sepero
Code:
In file included from /usr/include/wx/wx.h:15,
                 from wxTest.cpp:2:
/usr/include/wx/defs.h:32:2: #error "No Target! You should use wx-config program for compilation flags!"
I looked closer, and this line tells you your problem - the wx-config program will give you your compilation/linking flags. That's what I meant about docs regarding compilation - not compilation of the library, but of your code. The line will probably look like so:
Code:
g++ -Wall -o test_wx `wx-config --includes --libs` test_wx.cc
Mind you, I don't know what the wx-config syntax looks like, but you can probably run wx-config --help for more info on it.
__________________
"I'm not closed-minded, you're just wrong" - Bucky Katt
Reply With Quote
  #5  
Old 07-01-2003, 04:16 PM
Sepero's Avatar
Sepero Sepero is offline
Modurator Wannabe
 
Join Date: Mar 2003
Location: Tampa, FL USA
Posts: 2,193
Thanks Stuka, that's the kind of info I needed. Since I'm coming from Java, I really know almost nothing about compilation/linking flags. I knew I had to do 'something' with this wx-config program, I just didn't know what the f*** that was.

I'll try out different ways of trying to get it to work like that, then I report back.
Reply With Quote
  #6  
Old 08-02-2003, 03:20 AM
Sepero's Avatar
Sepero Sepero is offline
Modurator Wannabe
 
Join Date: Mar 2003
Location: Tampa, FL USA
Posts: 2,193
After taking a needed break, I came back and tried your suggestion.
Thanks Stuka, with a little modification it worked.

I used:
g++ `wx-config --cflags` -o wxTest wxTest.cpp


I greatly appreciate your help! Again, BIG THANKS!!!!!!!!!!!!!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 09:49 PM.

Help File Library
Security
Miscellaneous
Games
Programming
Modems
More



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
Free Newsletter
Server Daily


More Free Newsletters




internet.commerce
Be a Commerce Partner












Linux is a trademark of Linus Torvalds.

Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.