Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » HelloWorld makefile
HelloWorld makefile [message #41303] Thu, 28 November 2013 20:36 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I would like to test emscripten https://github.com/kripken/emscripten/wiki . The Duetto competitor has no good (for me) instructions.

It seems I must start with a Makefile and then substitute gcc with emcc ( https://github.com/kripken/emscripten/wiki/Building-Projects ). I am not so optimistic about it. However it would be fantastic to have a U++ package working in the browser (by the way, the emscripten test case work with Firefox, but fail with Chromium).

Anyway I need a working makefile project to start with.
I run under lubuntu 13.04 U++ 6572-raring-i386 , got by Honza PPA (it worked without problem as usual Cool ... thanks).

I was able to run the examples/HelloWorld package and then made a Makefile by menu item "Build/Output mode". The problem: I run "make" in the directory of the Makefile and appeared

luigi@luigi:~/HelloWorld$ make
mkdir -p _out/HelloWorld/GCC4.7-Gcc-Gui-Linux-Main-Posix-Shared/
mkdir -p _out/HelloWorld/GCC4.7-Gcc-Gui-Linux-Main-Posix-Shared/
mkdir -p _out/CtrlLib/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/CtrlCore/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/PdfDraw/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/Draw/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/plugin/bmp/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/RichText/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/Core/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
mkdir -p _out/plugin/png/GCC4.7-Gcc-Gui-Linux-Posix-Shared/
make: *** No rule to generate the target "HelloWorld/hello.cpp", necessary for " _out/HelloWorld/GCC4.7-Gcc-Gui-Linux-Main-Posix-Shared/hello .o ". Stop.

So it created only few directories and then stopped. It is since 10 years that I am not using make and never I have known how it worked.
Please send me anything able to build the HelloWorld package (whole library + HelloWorld) or give me some advice to get one working.

Many thanks,
Luigi
Re: HelloWorld makefile [message #41304 is a reply to message #41303] Thu, 28 November 2013 22:33 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Luigi,

You can try with the universal makefile. Good place to start would be probably something like
make -f uppbox/lpbuild2/mkfile PKG=HelloWorld CXX=emcc
executed in the checked out svn trunk. Inside the makefile, you can find additional documentation.

I tried to run it of course, but it fails miserably Smile But I haven't even read the instructions, so your results may be better...

I'm really interested in the results, emscripten is very interesting technology. Let us know how it works (or doesn't work). And of course, if you have trouble with the makefile, I can try to help...

Best regards,
Honza

PS: Thinking of it now, is the makefile really necessary? Why not just create emcc build method in TheIDE?
Re: HelloWorld makefile [message #41307 is a reply to message #41304] Fri, 29 November 2013 08:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dolik.rce wrote on Thu, 28 November 2013 16:33


PS: Thinking of it now, is the makefile really necessary? Why not just create emcc build method in TheIDE?


I would welcome that!

Note however that right now, there is intrinsic issue with emscripten and U++: Based on Javascript, emscripten inherits HTML5 runtime model, which basically does not allow (long story short) "Ctrl::Run" to exist...

So if ever we would want to support it, we would need "loop-less" mode for U++.

(Plus of course, half of Core would have to be made inactive...)

Mirek
Re: HelloWorld makefile [message #41310 is a reply to message #41304] Fri, 29 November 2013 16:06 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
dolik.rce wrote on Thu, 28 November 2013 22:33


PS: Thinking of it now, is the makefile really necessary? Why not just create emcc build method in TheIDE?


Very interesting but no success. It halt immediatly. With message "Unknown OS".

I'll try to make a Makefile.

Thanks
Luigi
Re: HelloWorld makefile [message #41318 is a reply to message #41310] Sat, 30 November 2013 11:57 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Fri, 29 November 2013 16:06



I'll try to make a Makefile.




... and even the makefile temptive failed.

I remember that several years ago I was able to have for free and easily, from Theide, a working makefile of my own project. Now seems hard to get one good for a reference package. Rolling Eyes

Perhaps depends by the distribution and where the lib/include are...

From other side I have not understood if the Mirek's words mean that the issue prevent U++ to work via emscripten or it is only a potential problem.

Luigi
Re: HelloWorld makefile [message #41320 is a reply to message #41318] Sat, 30 November 2013 13:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sat, 30 November 2013 05:57



From other side I have not understood if the Mirek's words mean that the issue prevent U++ to work via emscripten or it is only a potential problem.

Luigi


You can think about C++ running in emscripten as C++ running on some alien OS. U++ at this moment does not support that OS (just like it does not support e.g. iOS).

Now, it would probably be possible to add support for 'emscripten OS (eOS)' (and I would like to do that), but then there is one particular problem: there is no way how to implement explicit message loop in eOS. This in practice means that Ctrl::Run is impossible.

In the end, we could still have U++/eOS, but as Ctrl::Run is not possible, U++ applications for eOS would have to be specifically altered (quite heavily) to conform with this. E.g. this would not be possible anymore:

if(PromptYesNo("Do you want to perform this operation?")) {
    // perform the operation
}


instead, you would need to write

void MyApp::PerformOperation() {
    // perform the operation
}

PromptYesNo("Do you want to perform this operation?", THISBACK(PerformOperation))


Mirek
Re: HelloWorld makefile [message #41332 is a reply to message #41320] Sun, 01 December 2013 12:54 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
mirek wrote on Sat, 30 November 2013 13:44


In the end, we could still have U++/eOS, but as Ctrl::Run is not possible, U++ applications for eOS would have to be specifically altered (quite heavily) to conform with this. E.g. this would not be possible anymore:

if(PromptYesNo("Do you want to perform this operation?")) {
    // perform the operation
}


instead, you would need to write

void MyApp::PerformOperation() {
    // perform the operation
}

PromptYesNo("Do you want to perform this operation?", THISBACK(PerformOperation))


Mirek


Thanks for reply.
I am not sure to have completely understood. But if the problem is only to rewrite the Prompt_like() function of the user application, I am ready for my own app. Perhaps most of us are ready too.
However I am not aware if the whole library needs to be rewritten to accomodate such changes or just a new general function Prompt_eOS() should be added to overcome the issue.

I see huge advantages (both economics (no needs to own Mac & iOS device) and time saved (no new programming language)) that widely compensate the troubbles to rewrite the code of existing apps. Of course for a new app the problem does not exists.

Luigi

[Updated on: Sun, 01 December 2013 12:54]

Report message to a moderator

Re: HelloWorld makefile [message #41333 is a reply to message #41332] Sun, 01 December 2013 13:01 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sun, 01 December 2013 06:54


I am not sure to have completely understood. But if the problem is only to rewrite the Prompt_like() function of the user application, I am ready for my own app. Perhaps most of us are ready too.



That is unfortunately just a tip of iceberg. Worse, as Run (and Execute) does not exist, you cannot write

void PerformDialog {
    MyDialog dlg;
    if(dlg.Execute() == IDOK)
         DoSomething();
}


Quote:


I see huge advantages (both economics (no needs to own Mac & iOS device) and time saved (no new programming language)) that widely compensate the troubbles to rewrite the code of existing apps. Of course for a new app the problem does not exists.



Yes, that is true.

Mirek
Previous Topic: Bug in msc 7.1 ?
Next Topic: Painter replacement
Goto Forum:
  


Current Time: Fri Mar 29 02:55:18 CET 2024

Total time taken to generate the page: 0.01452 seconds