Compile Errors on Linux Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Compile Errors on Linux

Post by krisje8 » Sat Oct 28, 2006 1:36 pm

Hi,
I was making a little program with wxDev-C++ and it compiles perfectly in winxp (mingw).
But when I checked if it would compile in Linux it gave me a whole list of errors that hardly fitted in the terminal window.
I spend hours and hours trying to solve this, I now have version 2.6.3 of wxWidgets installed (first I had 2.4, also with errors).

Because I tought the problem might be in my program I tried to compile a sample, but it also returned compile errors (a little less, maybe).

You can see the errors here when I try to compile the mediaplayer example:
[email protected]:~/zooi/mediaplayertest/mediaplayer$ gcc mediaplayer.cpp 'wx-config --libs --cxxflags' -o mediaplayer
gcc: wx-config --libs --cxxflags: Onbekend bestand of map
mediaplayer.cpp:47:23: wx/wxprec.h: Onbekend bestand of map
mediaplayer.cpp:54:23: wx/wx.h: Onbekend bestand of map
mediaplayer.cpp:61:46: wx/mediactrl.h: Onbekend bestand of map
mediaplayer.cpp:62:62: wx/filedlg.h: Onbekend bestand of map
mediaplayer.cpp:63:68: wx/slider.h: Onbekend bestand of map
mediaplayer.cpp:64:66: wx/sizer.h: Onbekend bestand of map
mediaplayer.cpp:65:60: wx/timer.h: Onbekend bestand of map
mediaplayer.cpp:66:71: wx/textdlg.h: Onbekend bestand of map
mediaplayer.cpp:67:73: wx/notebook.h: Onbekend bestand of map
mediaplayer.cpp:68:61: wx/cmdline.h: Onbekend bestand of map
mediaplayer.cpp:69:45: wx/listctrl.h: Onbekend bestand of map
mediaplayer.cpp:70:61: wx/dnd.h: Onbekend bestand of map
mediaplayer.cpp:71:56: wx/filename.h: Onbekend bestand of map
mediaplayer.cpp:72:50: wx/config.h: Onbekend bestand of map
mediaplayer.cpp:82:2: #error "This is a GUI sample"
mediaplayer.cpp:87:2: #error "Not all required elements are enabled. Please modify setup.h!"
mediaplayer.cpp:136: error: parse-fout before `{' token
mediaplayer.cpp:153: error: parse-fout before `{' token
mediaplayer.cpp:157: error: destructors must be member functions
mediaplayer.cpp:160: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:160: error: `event' was not declared in this scope
mediaplayer.cpp:160: error: variable or field `OnQuit' declared void
mediaplayer.cpp:161: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:161: error: `event' was not declared in this scope
mediaplayer.cpp:161: error: variable or field `OnAbout' declared void
mediaplayer.cpp:163: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:163: error: `event' was not declared in this scope
mediaplayer.cpp:163: error: variable or field `OnOpenFileSamePage' declared
void
mediaplayer.cpp:164: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:164: error: `event' was not declared in this scope
mediaplayer.cpp:164: error: variable or field `OnOpenFileNewPage' declared void
mediaplayer.cpp:165: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:165: error: `event' was not declared in this scope
mediaplayer.cpp:165: error: variable or field `OnOpenURLSamePage' declared void
mediaplayer.cpp:166: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:166: error: `event' was not declared in this scope
mediaplayer.cpp:166: error: variable or field `OnOpenURLNewPage' declared void
mediaplayer.cpp:167: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:167: error: `event' was not declared in this scope
mediaplayer.cpp:167: error: variable or field `OnCloseCurrentPage' declared
void
mediaplayer.cpp:169: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:169: error: `event' was not declared in this scope
mediaplayer.cpp:169: error: variable or field `OnPlay' declared void
mediaplayer.cpp:170: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:170: error: `event' was not declared in this scope
mediaplayer.cpp:170: error: variable or field `OnPause' declared void
mediaplayer.cpp:171: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:171: error: `event' was not declared in this scope
mediaplayer.cpp:171: error: variable or field `OnStop' declared void
mediaplayer.cpp:172: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:172: error: `event' was not declared in this scope
mediaplayer.cpp:172: error: variable or field `OnNext' declared void
mediaplayer.cpp:173: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:173: error: `event' was not declared in this scope
mediaplayer.cpp:173: error: variable or field `OnPrev' declared void
mediaplayer.cpp:174: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:174: error: `event' was not declared in this scope
mediaplayer.cpp:174: error: variable or field `OnVolumeDown' declared void
mediaplayer.cpp:175: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:175: error: `event' was not declared in this scope
mediaplayer.cpp:175: error: variable or field `OnVolumeUp' declared void
mediaplayer.cpp:177: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:177: error: `event' was not declared in this scope
mediaplayer.cpp:177: error: variable or field `OnLoop' declared void
mediaplayer.cpp:178: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:178: error: `event' was not declared in this scope
mediaplayer.cpp:178: error: variable or field `OnShowInterface' declared void
mediaplayer.cpp:180: error: `wxCommandEvent' was not declared in this scope
mediaplayer.cpp:180: error: `event' was not declared in this scope
mediaplayer.cpp:180: error: variable or field `OnSelectBackend' declared void
mediaplayer.cpp:183: error: `wxNotebookEvent' was not declared in this scope
mediaplayer.cpp:183: error: `event' was not declared in this scope
mediaplayer.cpp:183: error: variable or field `OnPageChange' declared void
mediaplayer.cpp:186: error: `wxKeyEvent' was not declared in this scope
mediaplayer.cpp:186: error: `event' was not declared in this scope
mediaplayer.cpp:186: error: variable or field `OnKeyDown' declared void
mediaplayer.cpp:189: error: parse-fout before `&' token
mediaplayer.cpp:192: error: `wxListEvent' was not declared in this scope
mediaplayer.cpp:192: error: `event' was not declared in this scope
mediaplayer.cpp:192: error: variable or field `OnChangeSong' declared void
mediaplayer.cpp:195: error: `wxMediaEvent' was not declared in this scope
mediaplayer.cpp:195: error: `event' was not declared in this scope
mediaplayer.cpp:195: error: variable or field `OnMediaLoaded' declared void
mediaplayer.cpp:198: error: `wxCloseEvent' was not declared in this scope
mediaplayer.cpp:198: error: `event' was not declared in this scope
mediaplayer.cpp:198: error: variable or field `OnClose' declared void
mediaplayer.cpp:200: error: parse-fout before `private'
mediaplayer.cpp:207: error: parse-fout before `&' token
mediaplayer.cpp:208: error: parse-fout before `&' token
mediaplayer.cpp:211: error: 'wxString' is used as a type, but is not defined as
a type.
mediaplayer.cpp:212: error: syntax error before `*' token
mediaplayer.cpp:216: error: `friend' can only be specified inside a class
mediaplayer.cpp:217: error: `friend' can only be specified inside a class
mediaplayer.cpp:218: error: `friend' can only be specified inside a class
mediaplayer.cpp:219: error: parse-fout before `}' token
mediaplayer.cpp:228: error: parse-fout before `{' token
mediaplayer.cpp:233: error: `wxScrollEvent' was not declared in this scope
mediaplayer.cpp:233: error: `event' was not declared in this scope
mediaplayer.cpp:233: error: variable or field `OnBeginSeek' declared void
mediaplayer.cpp:234: error: `wxScrollEvent' was not declared in this scope
mediaplayer.cpp:234: error: `event' was not declared in this scope
mediaplayer.cpp:234: error: variable or field `OnEndSeek' declared void
mediaplayer.cpp:237: error: `wxMediaEvent' was not declared in this scope
mediaplayer.cpp:237: error: `event' was not declared in this scope
mediaplayer.cpp:237: error: variable or field `OnMediaFinished' declared void
mediaplayer.cpp:239: error: parse-fout before `public'
mediaplayer.cpp:243: error: `friend' can only be specified inside a class
mediaplayer.cpp:246: error: 'wxString' is used as a type, but is not defined as
a type.
mediaplayer.cpp:248: error: syntax error before `*' token
mediaplayer.cpp:250: error: syntax error before `*' token
mediaplayer.cpp:254: error: syntax error before `*' token
mediaplayer.cpp:255: error: syntax error before `*' token
mediaplayer.cpp:256: error: syntax error before `*' token
mediaplayer.cpp:257: error: syntax error before `*' token
mediaplayer.cpp:258: error: syntax error before `*' token
mediaplayer.cpp:259: error: syntax error before `*' token
mediaplayer.cpp:260: error: syntax error before `*' token
mediaplayer.cpp:261: error: syntax error before `*' token
mediaplayer.cpp:269: error: parse-fout before `{' token
mediaplayer.cpp:277: error: syntax error before `*' token
mediaplayer.cpp:284: error: parse-fout before `{' token
mediaplayer.cpp:289: error: syntax error before `.' token
mediaplayer.cpp:291: error: invalid use of `this' at top level
mediaplayer.cpp:292: error: syntax error before `.' token
mediaplayer.cpp:293: error: syntax error before `.' token
mediaplayer.cpp:294: error: syntax error before `.' token
mediaplayer.cpp:307: error: `wxListItem' was not declared in this scope
mediaplayer.cpp:307: error: `listitem' was not declared in this scope
mediaplayer.cpp:308: error: variable or field `GetSelectedItem' declared void
mediaplayer.cpp:308: error: syntax error before `{' token
mediaplayer.cpp:311: error: parse-fout before `while'
mediaplayer.cpp:319: error: ISO C++ forbids declaration of `nLastSelected' with
no type
mediaplayer.cpp:319: error: redefinition of `int nLastSelected'
mediaplayer.cpp:310: error: `int nLastSelected' previously defined here
mediaplayer.cpp:320: error: parse-fout before `}' token
mediaplayer.cpp:323: error: syntax error before `.' token
mediaplayer.cpp:371: error: syntax error before `*' token
mediaplayer.cpp:412: error: ISO C++ forbids declaration of `IMPLEMENT_APP' with
no type
mediaplayer.cpp: In function `int IMPLEMENT_APP(wxMediaPlayerApp)':
mediaplayer.cpp:412: error: `<anonymous>' has incomplete type
mediaplayer.cpp:135: error: forward declaration of `class wxMediaPlayerApp'
mediaplayer.cpp:412: error: parse-fout before `bool'
mediaplayer.cpp:413: error: invalid use of undefined type `class
wxMediaPlayerApp'
mediaplayer.cpp:135: error: forward declaration of `class wxMediaPlayerApp'
mediaplayer.cpp: In member function `bool wxMediaPlayerApp::OnInit()':
mediaplayer.cpp:414: error: `frame' undeclared (first use this function)
mediaplayer.cpp:414: error: (Each undeclared identifier is reported only once
for each function it appears in.)
mediaplayer.cpp:415: error: parse-fout before `(' token
mediaplayer.cpp:477: error: parse-fout before `&' token
mediaplayer.cpp:478: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp: In constructor `wxMediaPlayerFrame::wxMediaPlayerFrame(...)':
mediaplayer.cpp:478: error: class `wxMediaPlayerFrame' does not have any field
named `wxFrame'
mediaplayer.cpp:478: error: `NULL' undeclared (first use this function)
mediaplayer.cpp:478: error: `wxID_ANY' undeclared (first use this function)
mediaplayer.cpp:478: error: `title' undeclared (first use this function)
mediaplayer.cpp:478: error: `wxDefaultPosition' undeclared (first use this
function)
mediaplayer.cpp:478: error: `wxSize' undeclared (first use this function)
mediaplayer.cpp:483: error: `wxMenu' undeclared (first use this function)
mediaplayer.cpp:483: error: `fileMenu' undeclared (first use this function)
mediaplayer.cpp:483: error: parse-fout before `;' token
mediaplayer.cpp:484: error: `controlsMenu' undeclared (first use this function)
mediaplayer.cpp:484: error: parse-fout before `;' token
mediaplayer.cpp:485: error: `optionsMenu' undeclared (first use this function)
mediaplayer.cpp:485: error: parse-fout before `;' token
mediaplayer.cpp:486: error: `helpMenu' undeclared (first use this function)
mediaplayer.cpp:486: error: parse-fout before `;' token
mediaplayer.cpp:487: error: `debugMenu' undeclared (first use this function)
mediaplayer.cpp:487: error: parse-fout before `;' token
mediaplayer.cpp:489: error: `wxT' undeclared (first use this function)
mediaplayer.cpp:501: error: `wxID_EXIT' undeclared (first use this function)
mediaplayer.cpp:506: error: `wxID_STOP' undeclared (first use this function)
mediaplayer.cpp:522: error: `wxID_ABOUT' undeclared (first use this function)
mediaplayer.cpp:527: error: `wxMenuBar' undeclared (first use this function)
mediaplayer.cpp:527: error: `menuBar' undeclared (first use this function)
mediaplayer.cpp:527: error: parse-fout before `(' token
mediaplayer.cpp:533: error: `SetMenuBar' undeclared (first use this function)
mediaplayer.cpp:539: error: `m_notebook' undeclared (first use this function)
mediaplayer.cpp:539: error: parse-fout before `(' token
mediaplayer.cpp:621: error: `wxEVT_COMMAND_MENU_SELECTED' undeclared (first use
this function)
mediaplayer.cpp:622: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnQuit'
mediaplayer.cpp:622: error: `wxCommandEventHandler' undeclared (first use this
function)
mediaplayer.cpp:622: error: `Connect' undeclared (first use this function)
mediaplayer.cpp:625: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnAbout'
mediaplayer.cpp:628: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnLoop'
mediaplayer.cpp:631: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnShowInterface'
mediaplayer.cpp:634: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnOpenFileNewPage'
mediaplayer.cpp:637: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnOpenFileSamePage'
mediaplayer.cpp:640: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnOpenURLNewPage'
mediaplayer.cpp:643: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnOpenURLSamePage'
mediaplayer.cpp:646: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnCloseCurrentPage'
mediaplayer.cpp:649: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnPlay'
mediaplayer.cpp:652: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnStop'
mediaplayer.cpp:655: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnNext'
mediaplayer.cpp:658: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnPrev'
mediaplayer.cpp:661: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnSelectBackend'
mediaplayer.cpp:666: error: `wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED' undeclared
(first use this function)
mediaplayer.cpp:667: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnPageChange'
mediaplayer.cpp:667: error: `wxNotebookEventHandler' undeclared (first use this
function)
mediaplayer.cpp:672: error: `wxTheApp' undeclared (first use this function)
mediaplayer.cpp:672: error: `wxEVT_KEY_DOWN' undeclared (first use this
function)
mediaplayer.cpp:673: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnKeyDown'
mediaplayer.cpp:673: error: `wxKeyEventHandler' undeclared (first use this
function)
mediaplayer.cpp:674: error: `wxObject' undeclared (first use this function)
mediaplayer.cpp:674: error: parse-fout before `)' token
mediaplayer.cpp:679: error: `wxEVT_CLOSE_WINDOW' undeclared (first use this
function)
mediaplayer.cpp:680: error: incomplete type `wxMediaPlayerFrame' does not have
member `OnClose'
mediaplayer.cpp:680: error: `wxCloseEventHandler' undeclared (first use this
function)
mediaplayer.cpp:691: error: invalid use of undefined type `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:217: error: forward declaration of `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:705: error: `wxConfigBase' undeclared (first use this function)
mediaplayer.cpp:705: error: `conf' undeclared (first use this function)
mediaplayer.cpp:705: error: parse-fout before `::' token
mediaplayer.cpp:706: error: `wxString' undeclared (first use this function)
mediaplayer.cpp:709: error: `key' undeclared (first use this function)
mediaplayer.cpp:711: error: `outstring' undeclared (first use this function)
mediaplayer.cpp:713: error: invalid use of undefined type `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:217: error: forward declaration of `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:719: error: invalid use of undefined type `class
wxMediaPlayerTimer'
mediaplayer.cpp:210: error: forward declaration of `class wxMediaPlayerTimer'
mediaplayer.cpp:720: error: `Start' undeclared (first use this function)
mediaplayer.cpp:730: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp: In destructor `wxMediaPlayerFrame::~wxMediaPlayerFrame()':
mediaplayer.cpp:754: error: parse-fout before `::' token
mediaplayer.cpp:757: error: `GetItemCount' undeclared (first use this function)
mediaplayer.cpp:759: error: `pData' undeclared (first use this function)
mediaplayer.cpp:759: error: parse-fout before `)' token
mediaplayer.cpp:760: error: `wxString' undeclared (first use this function)
mediaplayer.cpp:761: error: `s' undeclared (first use this function)
mediaplayer.cpp:766: let op: possible problem detected in invocation of delete
operator:
mediaplayer.cpp:210: let op: `m_timer' has incomplete type
mediaplayer.cpp:210: let op: forward declaration of `class wxMediaPlayerTimer'
mediaplayer.cpp:766: note: neither the destructor nor the class-specific
operator delete will be called, even if they are declared when the class is
defined.
mediaplayer.cpp:772: error: `wxCloseEvent' undeclared (first use this function)
mediaplayer.cpp:772: error: `event' undeclared (first use this function)
mediaplayer.cpp:773: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp:773: error: invalid declarator
mediaplayer.cpp:773: error: syntax error before `{' token
mediaplayer.cpp:780: error: parse-fout before `&' token
mediaplayer.cpp:781: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp: In member function `void
wxMediaPlayerFrame::AddToPlayList(...)':
mediaplayer.cpp:785: error: invalid use of undefined type `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:217: error: forward declaration of `class
wxMediaPlayerNotebookPage'
mediaplayer.cpp:785: error: `szString' undeclared (first use this function)
mediaplayer.cpp:807: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp: In member function `void wxMediaPlayerFrame::ResetStatus()':
mediaplayer.cpp:808: error: `wxMediaCtrl' undeclared (first use this function)
mediaplayer.cpp:808: error: `currentMediaCtrl' undeclared (first use this
function)
mediaplayer.cpp:811: error: `m_basestatus' undeclared (first use this function)
mediaplayer.cpp:811: error: parse-fout before `::' token
mediaplayer.cpp:826: error: `wxCommandEvent' undeclared (first use this
function)
mediaplayer.cpp:826: error: `WXUNUSED' undeclared (first use this function)
mediaplayer.cpp:827: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp:827: error: invalid declarator
mediaplayer.cpp:827: error: syntax error before `{' token
mediaplayer.cpp:839: error: invalid use of undefined type `class
wxMediaPlayerFrame'
mediaplayer.cpp:152: error: forward declaration of `class wxMediaPlayerFrame'
mediaplayer.cpp:839: error: invalid declarator
mediaplayer.cpp:839: error: syntax error before `{' token
mediaplayer.cpp:841: error: syntax error before `.' token
mediaplayer.cpp:844: error: `msg' undeclared (first use this function)
mediaplayer.cpp:844: error: `wxT' undeclared (first use this function)
mediaplayer.cpp:844: error: `wxOK' undeclared (first use this function)
mediaplayer.cpp:844: error: `wxICON_INFORMATION' undeclared (first use this
function)
mediaplayer.cpp:844: error: invalid use of `this' in non-member function
mediaplayer.cpp:844: error: ISO C++ forbids declaration of `wxMessageBox' with
no type
mediaplayer.cpp:844: error: initializer list being treated as compound
expression
mediaplayer.cpp:844: confused by earlier errors, bailing out
[email protected]:~/zooi/mediaplayertest/mediaplayer$
My OS (linux) is Debian Stable, and I have wxWidgets 2.6.3 .

EDIT: Onbekend bestand of map is dutch for Unknown file or directory.
And parse-fout means parse-error.
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

dsilvia
Earned some good credits
Earned some good credits
Posts: 145
Joined: Sun May 29, 2005 3:42 pm
Location: Bettendorf, Iowa, USA (aka, BFE)

Post by dsilvia » Sat Oct 28, 2006 2:08 pm

Have you ever tried DialogBlocks? It builds with any compiler and on any platform that wxWidgets can be built with. I haven't used it in Linux for a while, but I never had any problems. I mostly do my work on Windows and build using Visual Studio and MinGW (demos and tutorials). DialogBlocks has saved me hours of pain I've had with other IDE's that are supposed to be cross platform (but have a few problems).

DialogBlocks is well supported by its author, Julian Smart, who also happens to be the originator of wxWidgets. I've never had any problems getting issues resolved and/or addressed in 24 hours or less.

It is available as a no time limit demo that has some restrictions on the number of elements contained in an application, but that's never been a big problem. And, if you find it useful (since it makes sure libraries are always correctly built for the application and it generates build system files for all platforms, I think you probably will), its cost is not prohibitive. But you do get what you pay for (definitely!;) and not left hanging like the free IDE's.

It's available at:

http://www.anthemion.co.uk/dialogblocks/

Give it a try, I've tried the others (Code::Blocks, wxDev-C++, and others) but none hold a candle to DialogBlocks for stability and reliablility. And none have the support!;)

DialogBlocks code builds across the board for Mac, Linux, Solaris, FreeBSD, Windows, and others, with any compilers available on those platforms for wxWidgets. And one license is good for all platforms!

HTH:

Dave S.

wxMS_developers

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Sat Oct 28, 2006 3:09 pm

Thanks for your answer,

Yes I have tried DialogBlocks, but it doesn't want to find my compiler in Linux.
I can select what I want but it searches for a folder that doesn't exist. (He spells the folder a bit different).
And I couldn't find a visual sight of my project in DialogBlocks, which I surely need as a beginner.

DialogBlock's might work, but so should all the others because they all use wxWidgets and the same compiler. I doubt that even if I can make it find my compiler it would work different then 'the normal way' .
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

dsilvia
Earned some good credits
Earned some good credits
Posts: 145
Joined: Sun May 29, 2005 3:42 pm
Location: Bettendorf, Iowa, USA (aka, BFE)

Post by dsilvia » Sat Oct 28, 2006 3:27 pm

krisje8 wrote:Thanks for your answer,

Yes I have tried DialogBlocks, but it doesn't want to find my compiler in Linux.
I can select what I want but it searches for a folder that doesn't exist. (He spells the folder a bit different).
And I couldn't find a visual sight of my project in DialogBlocks, which I surely need as a beginner.

DialogBlock's might work, but so should all the others because they all use wxWidgets and the same compiler. I doubt that even if I can make it find my compiler it would work different then 'the normal way' .
I don't understand what you mean by "doesn't find your compiler" and "He spells the folder a bit different". You tell it where your compiler is and the spelling is yours.

Can you enlighten me a bit more?

thx,
Dave S.

wxMS_developers

DavidHart
Site Admin
Site Admin
Posts: 3941
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Sat Oct 28, 2006 4:08 pm

Hi,

What happens if you change your compile line from
gcc mediaplayer.cpp 'wx-config --libs --cxxflags' -o mediaplayer
to
g++ mediaplayer.cpp 'wx-config --libs --cxxflags' -o mediaplayer ?

Regards,

David

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Sat Oct 28, 2006 4:17 pm

Sorry, it's not the compiler he doesn't find but wxWidgets.

When I point it to /usr/lib/wx/include there are 4 folders in it:

base-unicode-debug-2.6
base-unicode-release-2.6
gtk2-unicode-debug-2.6
gtk2-unicode-release-2.6

But instead of opening those folders he wants to open (not exisiting):

GCCBuildReleaseGTK2
GCCBuildReleaseGTK2Unicode
...
...

And that's not my only problem with DialogBlocks, it doesn't (or I must be really blind) have a visual sight (wysiwyg).

So, back on topic again: how do I fix my wxWidgets/compiler ?
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

DavidHart
Site Admin
Site Admin
Posts: 3941
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Sat Oct 28, 2006 5:03 pm

Did you also install the 'base' version of wxWidgets? It seems to be present, and part of your problem might be that you are picking up the wrong wx-config symlink; you can find out by doing ./wx-config --list in a terminal, from within the mediaplayer folder. If it finds the wrong one, delete/rename/move the 'base' versions. You'll probably find the wx-configs in /usr/local/bin

But I still think you'll need to invoke the compiler with g++ instead of gcc.

dsilvia
Earned some good credits
Earned some good credits
Posts: 145
Joined: Sun May 29, 2005 3:42 pm
Location: Bettendorf, Iowa, USA (aka, BFE)

Post by dsilvia » Sat Oct 28, 2006 5:23 pm

krisje8 wrote:Sorry, it's not the compiler he doesn't find but wxWidgets.

When I point it to /usr/lib/wx/include there are 4 folders in it:

base-unicode-debug-2.6
base-unicode-release-2.6
gtk2-unicode-debug-2.6
gtk2-unicode-release-2.6

But instead of opening those folders he wants to open (not exisiting):

GCCBuildReleaseGTK2
GCCBuildReleaseGTK2Unicode
...
...

And that's not my only problem with DialogBlocks, it doesn't (or I must be really blind) have a visual sight (wysiwyg).

So, back on topic again: how do I fix my wxWidgets/compiler ?
Well, since you want a drag'n'drop designer (which DB isn't), I won't bother with what is happening with the includes.

Hope you find your problem! :wink:

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Sat Oct 28, 2006 6:18 pm

DavidHart wrote:Did you also install the 'base' version of wxWidgets? It seems to be present, and part of your problem might be that you are picking up the wrong wx-config symlink; you can find out by doing ./wx-config --list in a terminal, from within the mediaplayer folder. If it finds the wrong one, delete/rename/move the 'base' versions. You'll probably find the wx-configs in /usr/local/bin

But I still think you'll need to invoke the compiler with g++ instead of gcc.
Thanks, I'll give a look at it tomorrow.

P.S.: g++ gives the same result as gcc
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Thu Nov 02, 2006 1:24 pm

DavidHart wrote:Did you also install the 'base' version of wxWidgets? It seems to be present, and part of your problem might be that you are picking up the wrong wx-config symlink; you can find out by doing ./wx-config --list in a terminal, from within the mediaplayer folder. If it finds the wrong one, delete/rename/move the 'base' versions. You'll probably find the wx-configs in /usr/local/bin

But I still think you'll need to invoke the compiler with g++ instead of gcc.
[email protected]:~/zooi/mediaplayertest/mediaplayer$ wx-config --list

Default config is gtk2-unicode-release-2.6

Default config will be used for output

Alternate matches:
base-unicode-debug-2.6
base-unicode-release-2.6
gtk2-unicode-debug-2.6

[email protected]:~/zooi/mediaplayertest/mediaplayer$
This is what I get, what should I do with it?
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

DavidHart
Site Admin
Site Admin
Posts: 3941
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Thu Nov 02, 2006 2:02 pm

This is what I get, what should I do with it?
That looks fine: it's making the correct choice.

One last suggestion. When you said you were using:
gcc mediaplayer.cpp 'wx-config --libs --cxxflags' -o mediaplayer
(which line I later copied/pasted/altered to g++) I presume the quote marks aren't precisely what you used. They should be backticks:
g++ mediaplayer.cpp `wx-config --libs --cxxflags` -o mediaplayer

If that was just a typo, and you can't build even the minimal sample, perhaps it's a wxDev-Cpp issue of some sort. I know nothing about such things, and I suggest you open a new thread in the wxDevCpp section of the forum.

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Thu Nov 09, 2006 7:24 pm

Thank you for helping me, I think the typo did make difference.
I still cannot compile the sample, but that doesn't matter.
I tried my own program now and it _only_ gave me this error:

[email protected]:/mnt/hdc5/Dev-Cpp/projects/IntraMsg2$ g++ IntraMsg2App.cpp `wx-config --libs --cxxflags` -o IntraMsg2
/tmp/cc8RU8ae.o(.text+0x105): In function `IntraMsg2FrmApp::OnInit()':
: undefined reference to `IntraMsg2Frm::IntraMsg2Frm[in-charge](wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long)'
collect2: ld gaf exit-status 1 terug


So, I'm almost there! :-) (I think...)

Maybe you could help me with this error too?
If you want I can post the sourcecode.

P.S.: "gaf exit-status 1 terug" means something like "returned exit-status 1"


EDIT:
[email protected]:/mnt/hdc5/Dev-Cpp/projects/IntraMsg2$ g++ *.cpp `wx-config --libs --cxxflags` -o IntraMsg2
IntraMsg2Frm.cpp: In member function `void
IntraMsg2Frm::WxButton1Click(wxCommandEvent&)':
IntraMsg2Frm.cpp:171: error: cannot convert `const wxChar*' to `const char*' in
initialization
IntraMsg2Frm.cpp:174: error: cannot convert `const wxChar*' to `const char*' in
initialization
Maybe this error is better :-) ?

EDIT2:
it's about this piece of code:

Code: Select all

char argument[1073];
    const char *aan = WxEdit1->GetValue().c_str();     // Idem, maar nu voor aan.
    char aan2[64];
    sprintf (aan2,"%s",aan);
    const char *bericht = Message->GetValue().c_str(); //De inhoud van het berichtvakje
    char bericht2[1000];                               //is nu aan de char bericht gegeven.
    sprintf (bericht2,"%s",bericht);
(line 170-176)
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

DavidHart
Site Admin
Site Admin
Posts: 3941
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Thu Nov 09, 2006 8:36 pm

Maybe this error is better
Hey, that one I know ;)
You'll have this problem only in a unicode build. The line:
const char *aan = WxEdit1->GetValue().c_str(); // Idem, maar nu voor aan.
Should be:
const char *aan = WxEdit1->GetValue().mb_str(wxConvUTF8); // Idem, maar nu voor aan.
(Though I think I remember someone having a problem doing this sort of thing in two stages. You might need instead to do:
sprintf (aan2,"%s",WxEdit1->GetValue().mb_str(wxConvUTF8));
)

krisje8
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sat Oct 28, 2006 1:24 pm
Location: The Netherlands
Contact:

Post by krisje8 » Fri Nov 10, 2006 3:07 pm

Thank you, it compiled!

But, I can't run it :-(.
I get this error:
./IntraMsg2
bash: ./IntraMsg2: Toegang geweigerd
debian:/mnt/hdc5/Dev-Cpp/projects/IntraMsg2#

Toegang geweigerd means something like Entry refused or Permission denied.
I chmodded it 777, and I even tried to execute it under root but it doesn't want to run.


Never mind, th problem was that I was running it from a different hard drive (fat32).
After copying it to my home folder it opened perfectly.

Many thanks!
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, *for free*'." - Linus Torvalds

Post Reply