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++ » Mac OS » Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35732 is a reply to message #35730] Thu, 15 March 2012 01:50 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
fudadmin wrote on Wed, 14 March 2012 15:21

you can try my Core and help to merge... Smile. Leaving? Ok. see you later. thanks for trying.


Sorry, Tom, I was rushing and juggling computers and other tasks.
Forget the Core.zip above...

Only 1 problem in core for now and it should compile.

What helps is:
Id::Id(const String& s) { id = s; }
Id::Id(const char *s) { id = s; }

I mean, split the declaration and definition and move the latter to the *.cpp file intelligently... Smile

But I don't foresee this is a proper intelligent solution. Very likely it's a road mine which can explode and I am glad you exposed it. Cocoa's objc uses 'id' for any object. 'id' might be isolated (if used) by a namespace and not to clash in cpp part but in the future we will need to think what to do. Rename all 'id' in u++ and declare it taboo? It would be interesting what other guys and Mirek think? Btw, there are no namespaces in objc. Only the dark room... Smile

Edit1: Also, download the updated UNS.zip from the other topic
Edit2: the GccBuilder.icpp I posted doesn't link (or stopped linking) for some reasons. I will try to find out. But first, try to compile.
Edit3: linking also depends on flags... the updated UNS compiles and runs on windows with the latest upp <Core> and the changes already mentioned.

[Updated on: Thu, 15 March 2012 06:22]

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35741 is a reply to message #35732] Thu, 15 March 2012 11:36 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

Great! Good thing you figured out the Id stuff. In my opinion Mirek's word on solving the namespace issue would be needed.

--

Now: I was actually able to compile+link+run the test app on GNUstep using SVN4690 sources modified as follows:

1. Core/config.h as you showed above.

2. GccBuilder in the way you demonstrated and I yesterday uploaded the 'intelligently' merged changes compatible with SVN4690.

3. Applied the Id::Id fix in the Value. (BTW: This works the same way for OldValue and the new SVO_VALUE.)

4. I had to change UNS.h as follows to remove some errors:

...

#ifdef  __OBJC__
extern "C"{                          // 2012-03-15 Tom added
#define INTPTR_MAX 0x7fffffff	     // 2012-03-15 Tom added
#include <Cocoa/Cocoa.h>
#include <Foundation/Foundation.h>
}                          // 2012-03-15 Tom added
#include "UNSDef.h"

...


Flags were "COCOA USEMALLOC". (This also worked with SVO_VALUE).

--

What comes out of this is an empty console window and then an empty gray 300x300px window. So, it works! (Right?)

Now, how to connect TopWindow and other Ctrls to this?

// Tom
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35745 is a reply to message #35741] Thu, 15 March 2012 14:42 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Very good news you have got it running! But I don't need this:
...

#ifdef  __OBJC__
extern "C"{                          // 2012-03-15 Tom added
#define INTPTR_MAX 0x7fffffff	     // 2012-03-15 Tom added
#include <Cocoa/Cocoa.h>
#include <Foundation/Foundation.h>
}                          // 2012-03-15 Tom added
#include "UNSDef.h"

...


Also it looks that this kind of includes I had left commented (except INTPTR_MAX) are still needed. But, according to some, it is

a brutal fix

What gcc version have got? I have got 4.6.1.

You can try to use UNSWindow and UNSView in CocWnd and other stuff from UNS package.
I will post more later.
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35747 is a reply to message #35745] Thu, 15 March 2012 15:14 Go to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
I've got 4.6.1 too, but still needed the changes...

I'll stay tuned for more details on UNSWindow and UNSView.

Thanks and best regards,

Tom
Previous Topic: upp-cocoa CtrlCore skeleton package to play
Next Topic: some cocoa with OpenGL in upp sandbox! (UNS, UNSCtrl , UNStest)
Goto Forum:
  


Current Time: Fri Apr 19 06:46:52 CEST 2024

Total time taken to generate the page: 0.03383 seconds