bugGNUstep - Bugs: bug #34453, linking against C functions like...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34453: linking against C functions like NSRunAlertPanel() from ObjC++ fails

Submitted by:  julian <julian_>
Submitted on:  Sat 01 Oct 2011 07:04:02 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 04 Oct 2011 01:40:49 PM UTC, comment #3:

Committed your patch.

Fred Kiefer <FredKiefer>
Project Member
Tue 04 Oct 2011 11:34:43 AM UTC, comment #2:

thanks, i can confirm the fix works.

i've also wrapped the other cases in GUI where this is needed, see attached patch.

all C functions in BASE were already wrapped.

(file #24095)

julian <julian_>
Tue 04 Oct 2011 06:00:00 AM UTC, comment #1:

I guess this is the trivial case of needing to wrap declarations for C++ code

I modified NSPanel.h with:

#if defined(__cplusplus)
extern "C" {
#endif

#if defined(__cplusplus)
}
#endif

Hopefully that fixes it (though it may be needed for other headers.

Richard Frith-Macdonald <CaS>
Project Member
Sat 01 Oct 2011 07:04:02 PM UTC, original submission:

linking against C functions like NSRunAlertPanel() from ObjC++ source files fails, although using the Obj-C based API works fine. error occurs on current clang SVN trunk, didn't try gcc.

trivial testcase attached.

julian <julian_>

 

Attached Files
file #24095:  cplusplus.diff added by julian_ (2KiB - application/octet-stream)
file #24071:  test.tar.gz added by julian_ (795B - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by julian_ (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 04 Oct 2011 01:40:49 PM UTCFredKieferOpen/ClosedIn Test=>Closed
    Tue 04 Oct 2011 11:34:43 AM UTCjulian_Attached File-=>Added cplusplus.diff, #24095
    Tue 04 Oct 2011 06:00:00 AM UTCCaSCategoryNone=>Gui/AppKit
      StatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Sat 01 Oct 2011 07:04:02 PM UTCjulian_Attached File-=>Added test.tar.gz, #24071

    Back to the top


    Powered by Savane 3.1-cleanup1