realbasic-nug
[Top] [All Lists]

Re: Declares different on Win v Mac?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Declares different on Win v Mac?
From: Ken Mankoff <mankoff at gmail dot com>
Date: Tue, 9 Aug 2005 17:21:08 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=cPrQB6b19SzmotY2M/HSuRpMRAyaV5fWJI9nZrH7GSRFB+RiJida3M7gcm9tMJ8Sxg6Yob0FmpNkrDTVvDapEtD5UNF8Lj5EIxQTvgwA1lDwSqRGWvy6678mUQGI/PDnLcmx2HaieRtEEE7f56rAjjOvFeUhLD/ihM2x56SeeVs=
References: <5c8121ef0508091052c482c3d at mail dot gmail dot com> <5c8121ef05080912024361f9a5 at mail dot gmail dot com> <D1D7EB0E-0B2E-42B9-8E71-3434541FF95C at ljug dot com> <5c8121ef050809130057217c90 at mail dot gmail dot com> <46e73e096e851f1393a1dddb0a0d364b at declareSub dot com> <5c8121ef05080913151d0b8b42 at mail dot gmail dot com> <C43ED94A-C2BC-49AF-8A67-F2D538260F13 at ljug dot com> <5c8121ef05080913211c0599ad at mail dot gmail dot com> <5c8121ef05080913507b40adaa at mail dot gmail dot com> <D0E8B29A-211E-48CA-89FE-7073CD77BA5A at chaoticbox dot com>
On 8/9/05, Frank Condello <developer at chaoticbox dot com> wrote:
> 
> On 9-Aug-05, at 4:50 PM, Ken Mankoff wrote:
> 
> > We'd have to redesign the entire Declare system and much of the
> > compiler
> > frontend to fix this problem; it is an error not of implementation
> > but of
> > design.
> 
> Everyone seems to be missing the real issue - if two declares confuse
> the compiler, the obvious solution is to use one declare. So, if RB
> let you define constants for build environments, i.e. "Mach-O Debug"
> vs. "Mach-O Release" everything would be fine.


Agreed. In fact, I filled out a feature request for this about 6 months ago:
http://www.realsoftware.com/feedback/viewreport.php?reportid=bfrmpvcl

An alternate (better) solution would be to provide a post-linker
> "copy files" phase so we can stuff dylibs into the app bundle where
> they belong.
> 
> @Ken; If you've only got a few declares to this library, try defining
> constants locally in each method:

#If TargetMacOS
> #If DebugBuild
> Const libname = "aoeu"
> #else
> Const libname = "aoeuX"
> #endif
> #elseif TargetWin32
> Const libname = "aoeuW"
> #endif
> 
> soft declare function foo lib libname ( baz as integer ) as integer


I wish. I have 36 declares. Actually, 36 x 2 because I've done each 2x, once 
for DebugBuild and once for release build. I was about to make it 36 x 3 by 
adding in the #TargetWin32, but I guess I'll have to find another solution.

-k.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>