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 #35690 is a reply to message #35681] |
Tue, 13 March 2012 10:29   |
Tom1
Messages: 1319 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Aris,
Thanks for bringing to my knowledge the alternative test platform - GNUstep. I just downloaded+installed the parts (MSYS system, core and devel) for windows. I may be a bit ahead of schedule with this, but: Once you get your work uploaded, could you please post a (hopefully short step-by-step guide how to get it up and running on GNUstep.
--
I don't know the big picture, so don't take me too seriously, but I think OpenGL is always used in companion with something else, like GDI, X11 or Cocoa in this case. So, maybe GUI_OPENGL should not exist as an alternative to GUI_X11, etc. but instead as a kind of add-on to them.
Best regards,
Tom
|
|
|
|
|
|
| Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35694 is a reply to message #35689] |
Tue, 13 March 2012 18:56   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
| mirek wrote on Tue, 13 March 2012 07:11 |
| fudadmin wrote on Mon, 12 March 2012 13:18 |
But, I am sorry, IMO, PLATFORM_POSIX meaning is too wide and confusing..
|
Why confusing? The sole purpose is to identify API for conditional compilation. POSIX represents a pretty wide but guaranteed set of API calls, which is different from Win32 API.
Surely, PLATFORM_LINUX or PLATFORM_BSD are narrower subsets, but it is definitely worth to have superset, as most things are the same.
Mirek
|
ok, thanks. I will try to adjust them as little as possible to be fit for purpose. And then you adjust...
|
|
|
|
|
|
| Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35716 is a reply to message #35704] |
Wed, 14 March 2012 13:49   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
check MINGW.bm
BUILDER = "GCC";
COMPILER = "g++";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
DEBUG_OPTIONS = "-O0 -gstabs -pipe -fvisibility=hidden -Wno-trigraphs";
DEBUG_FLAGS = "";
DEBUG_LINK = "";
RELEASE_BLITZ = "1";
RELEASE_LINKMODE = "1";
RELEASE_OPTIONS = "-O3 -ffunction-sections";
RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections";
RELEASE_FLAGS = "";
RELEASE_LINK = "";
DEBUGGER = "gdb";
PATH = "C:\\MinGW\\bin";
INCLUDE = "C:\\MinGW\\include;C:\\GNUstep\\GNUstep\\System\\Library\\Headers";
LIB = "C:\\MinGW\\lib;C:\\GNUstep\\GNUstep\\System\\Library\\Libraries";
REMOTE_HOST = "";
REMOTE_OS = "";
REMOTE_TRANSFER = "";
REMOTE_MAP = "";
LINKMODE_LOCK = "0";
Edit: for some reasons forum doesn't allow to upload ide.zip
but try to put your mingw.bm and your version somewhere:
C:\GNUstep\msys\1.0\home\arilect\upp
[Updated on: Wed, 14 March 2012 14:07] Report message to a moderator
|
|
|
|
|
|
| Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35718 is a reply to message #35717] |
Wed, 14 March 2012 14:18   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
try to change part of Core/config.h
#define COMPILER_GCC 1
#if __WIN32
#define COMPILER_MINGW
#define OS_WINDOWS
#define PLATFORM_WIN32
#endif
#ifdef __OBJC__
#include <objc/objc.h>
#endif
#if flagCOCOA
#define PLATFORM_COCOA
#define GUI_COCOA 1
#endif
#if flagX11
#define GUI_X11 1 //aris002 for cygwin?
#endif
#if flagGUI_WIN
#define GUI_WIN
#endif
#if __unix || __unix__ || __APPLE__
#define PLATFORM_POSIX 1
Edit: actually I changed everything in Core from PLATFORM_WIN32 to OS_WINDOWS and then have been trying to adjust other parts but at the start you don't need.
Please post your errors.
[Updated on: Wed, 14 March 2012 14:27] Report message to a moderator
|
|
|
|
| Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35720 is a reply to message #35718] |
Wed, 14 March 2012 14:49   |
Tom1
Messages: 1319 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Aris,
Your feeding instructions at a rate well beyond my internal clock, but I'm catching up eventually. So, I have applied changes to MINGW.bm, config.h and now finally merged your GccBuilder.icpp. However, this last change caused inability to build theide:
----- ide/Builders ( GUI SVO_VALUE GCC WIN32 ) (5 / 35)
GccBuilder.icpp
...
There were errors. (0:01.27)
How to proceed?
Best regards,
Tom
Edit by fudadmin: deleted the log to keep the forums cleaner .
[Updated on: Thu, 15 March 2012 06:14] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35727 is a reply to message #35726] |
Wed, 14 March 2012 15:43   |
Tom1
Messages: 1319 Registered: March 2007
|
Ultimate Contributor |
|
|
Tried with and without .NOGTK -- no apparent difference. Then tried to add SVO_VALUE, but that did not have effect either.
Here are the first lines of plenty more...
----- UNS ( GUI USEMALLOC COCOA TEST_UNS SVO_VALUE GCC SHARED WIN32 ) (1 / 7)
UNSUtils.mm
UNSApplication.mm
UNSApplicationDelegate.mm
UNSImage.mm
UNSView.mm
In file included from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/Core.h:251:0,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Draw/Draw.h:6,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/RichText/RichText.h:4,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:11,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h: In constructor 'Upp::Id::Id(const Upp::String&)':
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h:80:52: error: expected unqualified-id before '=' token
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h: In constructor 'Upp::Id::Id(const char*)':
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h:81:52: error: expected unqualified-id before '=' token
In file included from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObject.h:30:0,
from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/FoundationErrors.h:29,
from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/Foundation.h:33,
from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:33,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObjCRuntime.h: At global scope:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObjCRuntime.h:147:20: error: 'INTPTR_MAX' was not declared in this scope
In file included from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/Foundation.h:68:0,
from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:33,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSFileManager.h:190:8: warning:
'NSDirectoryEnumerator' has a field 'NSDirectoryEnumerator::_flags' whose type uses the anonymous namespace [enabled by defaul
t]
In file included from C:\GNUstep\GNUstep\System\Library\Headers/AppKit/AppKit.h:93:0,
from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:34,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/AppKit/NSDataLink.h:150:25: error:
previous declaration of 'NSString* NSDataLinkPboardType' with 'C++' linkage
C:\GNUstep\GNUstep\System\Library\Headers/AppKit/NSPasteboard.h:109:25: error:
conflicts with new declaration with 'C' linkage
In file included from C:\GNUstep\GNUstep\System\Library\Headers/AppKit/AppKit.h:159:0,
// Tom
[Updated on: Thu, 15 March 2012 06:16] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
| 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   |
 |
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... . 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... 
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... 
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   |
Tom1
Messages: 1319 Registered: March 2007
|
Ultimate 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
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 25 13:02:36 GMT+2 2026
Total time taken to generate the page: 0.01071 seconds
|