compiling for winCE from linux

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

Is there any way to find out whats wrong with filedlg.obj?
I tried to search for _CommDlgExtendedError, but I didn't find anything.

Can I get around it without canging wxUSE_FILEDLG to 0?
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

I have absolutely no clue!!
wxWidgets seems uncompilable for winCE.
I give up for now, until anybody gives me a hint.
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
Are you sure that you link with Commdlg.lib?
BTW: Search for "CommDlgExtendedError", not "_CommDlgExtendedError". The latter is just the symbol in the lib.

All I can say is that after downloading 2.5.3 and the WinCE patch, it compiled just fine and out of the box with eVC 4.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:wxWidgets seems uncompilable for winCE.
That's not (fully) true. The number of possible builds of wxWinCE is that large that it is hard to test everything but just yesterday I builded CVS Head for MS Smartphone using eVC3 and it works perfectly on dialogs and minimal samples. As I said wxWinCE port is not widely used so it can have holes but wxWidgets is cooperative work and you are the one who is best placed to solve your problems. Undefined references during linking are one of the simplest development problems in general, so...
styggentorsken wrote:I give up for now, until anybody gives me a hint.
... I would start from searching where this symol you are refering here exist. The places to be searched are: google, eVC headers and libs, wxWidgets headers and sources. Please provide your findings so the wxWidgets good be improved for next users. I'm looking forward to your findings as I myself do not have any problem using bakefile 0.1.5, eVC3 and smartphone emulator build. BTW: yesterday I saw a post in mailing list about wxWinCE build for PocketPC where somebody seemed to build without problems. Perhaps something is broken on your side then. Try to contact that person so he could direct your to correct solution.

One more thing. Are you sure you have the same build settings/target for minimal sample as you had for wxWidgets library?

Regards, ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

Image

I think I owe you a little summary:

To compile wxWidgets for emulator i did:
Installed eVC 3
Downloaded wxWidgets from wxWidgets.org (2.5.3)
Compiled \wxWidgets\build\wince\wx.vcw by clicking "build" on each project.
Downloaded and extracted wincepatch.zip from http://ftp.uoi.gr/mirror/X11/wxWindows/2.5.3/
Linked commdlg.lib, <--- IMPORTANT

To compile wxWidgets for Ipaq 3950 i did:
Installed eVC 3 (ok then, it was already installed)
Downloaded wxWidgets from CVS_HEAD http://biolpc22.york.ac.uk/pub/CVS_HEAD/
Changed the Linux linefeeds in all important projects and workspaces with a hex-editor
(could perhaps used the bakefile method here)
replaced condition #ifdef __SMARTPHONE__ with #ifdef __WXWINCE__ in wxWidgets\src\msw\window.cpp
Compiled the projects the same way, but with (WCE ARM) setting (not available in the original 2.5.3).

Linked commdlg.lib, <--- IMPORTANT
Compiled the minimal sample!!!!
Last edited by styggentorsken on Mon Jan 31, 2005 7:06 am, edited 1 time in total.
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

I now made it to compile my own programs too, but I got one problem.

The menu won't show. It did show in minimal.exe, but not in my own program. (only the status-bar is visible)
I didn't find any differences between the code in the two projects either.

Replacing my code with the one from minimal.cpp doesn't fix the problem, so there's gotta be some other difference between the two projects.
I have tried to copy the settings from minimal.vcw to my own project, but without success. (I skipped the options containing paths to folders inside the minimal-folder)

How was minimal.vcw created? I seem to have missed something.
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:Linked commdlg.lib, <--- IMPORTANT
....
Linked commdlg.lib, <--- IMPORTANT
In file include/wx/msw/wince/libraries.h there is a line

Code: Select all

#if _WIN32_WCE >= 400
    #pragma comment(lib,"commdlg.lib")
#endif
Could you please verify removing #if around library inclusion would work for you?
styggentorsken wrote:Compiled the minimal sample!!!!
Congratulations!!!! :-)

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

BTW: Are you aware that you are mixing two different versions? 2.5.3 is not CVS_Head. Fortunatelly it works for WinCE but for some of port that would not work because wxWidgets are under contignous development which means CVS_Head which is daily state has several changes in comparison to a few months old 2.5.3.

Regards, ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:How was minimal.vcw created?
Creations of project files is automated. It means file samples/minimal/minimal.bkl is processed with utility called Bakefile which produces makefiles and project files for variety of toolkits.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

I'm only using the CVS-version, but I have tried them both. I guess its possible to build for Ipaq3950 with both of them, but it was easier with the CVS-version since it's sample-projects already was cofigured for building for ARM architecture.

Tried what you said, and compiled. Now I didn't need to manualy set up commdlg.lib as a libriary-module.
(but the menu still doesn't show though)
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:Tried what you said, and compiled. Now I didn't need to manualy set up commdlg.lib as a libriary-module.
Great!
styggentorsken wrote:(but the menu still doesn't show though)
Could that be issue mentioned http://lists.wxwidgets.org/cgi-bin/ezml ... bkabkhkfjo ?

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

I don't think so.
I compiled my program with the wxWidgets2.5.3 from wxwidgets.org for emulation on x86 architecture and the menu still didn't show.
And after all; when compiling the project /wxWidgets/Samples/minimal/minimal.vcw, the menu shows, (you can see that on the picture).
So I think it has something to do with my way of setting up a new WCE project. But I can't find any differences between minimal.vcw and my own (krypt.vcw).
Menus always shows when compiling samples, and never when compiling my own projects. No matter which wxWidgets or hardware I'm using.

(note that i'm compiling for PocketPc 2002, not 2003)
And my very last question (I hope):
I need to include ctime or some other file with a rand() function. It was definately not enough to add #include <ctime> or "ctime".
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:I don't think so.
Sorry then... :-( All I can suggest is to debug it and find a place when one of the internal functions fails.
styggentorsken wrote:I need to include ctime or some other file with a rand() function. It was definately not enough to add #include <ctime> or "ctime".
Look at the demos/bombs demo. Some time ago I included there a replacement for random generator which worked on wxWinCE and used some undocumented feature.

Regards, ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
styggentorsken
Knows some wx things
Knows some wx things
Posts: 40
Joined: Sat Oct 16, 2004 9:08 pm
Location: Norway

Post by styggentorsken »

I found a solution!
By adding minimal.rc to the project!
I did not even have to include it from the sourcecode (#include ...).
I don't know why this helped either.
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

styggentorsken wrote:I found a solution!
By adding minimal.rc to the project!
(...)
I don't know why this helped either.
Oh, I understand it now. Empty menu is hardcoded in this resource file which is increased during creation of the menu in your wx code. Thanks for finding it!

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
Post Reply