this declaration may not have extern "C" linkage while porting C++code from sunos to HP - VMS

This is a discussion on this declaration may not have extern "C" linkage while porting C++code from sunos to HP - VMS ; Hi, Im porting a source code base from sunos to HP-UX. While compiling some sources, Im getting the errors like /opt/aCC/include/rw/xphasht.h", line 161: error #2800: this declaration may not have extern "C" linkage template class RWTExport RWTPtrHashTableIterator; "/opt/aCC/include/rw/xphasht.h", line 173: ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: this declaration may not have extern "C" linkage while porting C++code from sunos to HP

  1. this declaration may not have extern "C" linkage while porting C++code from sunos to HP

    Hi,

    Im porting a source code base from sunos to HP-UX. While compiling
    some sources, Im getting the errors like

    /opt/aCC/include/rw/xphasht.h", line 161: error #2800: this
    declaration may not have extern "C" linkage
    template class RWTExport RWTPtrHashTableIterator;

    "/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this
    declaration may not have extern "C" linkage
    template class RWTExport RWTPtrHashTable

    /opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this
    declaration may not have extern "C" linkage
    template RWTPtrSlink*

    Is there some changes required while using roguewave libraries on HP?
    The compile command is
    aCC -w -Aa -AP -library=std,rwtools7,stream,Csup +p +Z -DUNIX -DSYSV -
    D_XOPEN_SOURCE
    -D_POSIX_SOURCE -D_HPUX_SOURCE -DRW_NO_STL -DINF_UNIX_SRC -DINF_N_MENU
    -D__EXTERN_C__
    -DAR_CPLUSPLUS -D__COMP_FILE__=

    Please help me out.

  2. Re: this declaration may not have extern "C" linkage while porting C++ code from sunos to HP

    This probably isn't the best place to ask this kind of question as this is a
    VMS based newsgroup.

    I'd recommend the HP-UX related forums in the HP ITRC instead - see
    www.itrc.hp.com

    --
    Cheers, Colin.
    Legacy = Stuff that works properly!



  3. Re: this declaration may not have extern "C" linkage while portingC++ code from sunos to HP

    writetosanjesh@gmail.com wrote:
    > Im porting a source code base from sunos to HP-UX. While compiling
    > some sources, Im getting the errors like
    >
    > /opt/aCC/include/rw/xphasht.h", line 161: error #2800: this
    > declaration may not have extern "C" linkage
    > template class RWTExport RWTPtrHashTableIterator;
    >
    > "/opt/aCC/include/rw/xphasht.h", line 173: error #2800: this
    > declaration may not have extern "C" linkage
    > template class RWTExport RWTPtrHashTable
    >
    > /opt/aCC/include/rw/xpslist.cc", line 416: error #2800: this
    > declaration may not have extern "C" linkage
    > template RWTPtrSlink*


    Not related to OpenVMS at all.

    But the error message seems clear enough - it does not like
    the usage of templates with extern "C" block - and I think
    other compilers don't allow that either.

    Arne

  4. Re: this declaration may not have extern "C" linkage while porting C++

    In article , writetosanjesh@gmail.com writes:
    > Hi,
    >
    > Im porting a source code base from sunos to HP-UX. While compiling
    > some sources, Im getting the errors like
    >


    Which is relavent to VMS why?


  5. Re: this declaration may not have extern "C" linkage while porting C++

    In article ,
    koehler@eisner.nospam.encompasserve.org (Bob Koehler) writes:
    > In article , writetosanjesh@gmail.com writes:
    >> Hi,
    >>
    >> Im porting a source code base from sunos to HP-UX. While compiling
    >> some sources, Im getting the errors like
    >>

    >
    > Which is relavent to VMS why?


    It's as relevant as the RIAA. :-)

    bill


    --
    Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
    bill@cs.scranton.edu | and a sheep voting on what's for dinner.
    University of Scranton |
    Scranton, Pennsylvania | #include

  6. Re: this declaration may not have extern "C" linkage while porting C++

    In article <5u1m4rF1fm3msU1@mid.individual.net>, billg999@cs.uofs.edu (Bill Gunshannon) writes:
    >
    >
    >In article ,
    > koehler@eisner.nospam.encompasserve.org (Bob Koehler) writes:
    >> In article , writetosanjesh@gmail.com writes:
    >>> Hi,
    >>>
    >>> Im porting a source code base from sunos to HP-UX. While compiling
    >>> some sources, Im getting the errors like
    >>>

    >>
    >> Which is relavent to VMS why?

    >
    >It's as relevant as the RIAA. :-)


    ....but that was marked "Off Topic".


    --
    VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM

    "Well my son, life is like a beanstalk, isn't it?"

    http://tmesis.com/drat.html

  7. Re: this declaration may not have extern "C" linkage while porting C++

    In article <6xOej.2$xl6.0@newsfe09.lga>, VAXman- @SendSpamHere.ORG writes:
    > In article <5u1m4rF1fm3msU1@mid.individual.net>, billg999@cs.uofs.edu (Bill Gunshannon) writes:
    >>
    >>
    >>In article ,
    >> koehler@eisner.nospam.encompasserve.org (Bob Koehler) writes:
    >>> In article , writetosanjesh@gmail.com writes:
    >>>> Hi,
    >>>>
    >>>> Im porting a source code base from sunos to HP-UX. While compiling
    >>>> some sources, Im getting the errors like
    >>>>
    >>>
    >>> Which is relavent to VMS why?

    >>
    >>It's as relevant as the RIAA. :-)

    >
    > ...but that was marked "Off Topic".


    Instead of the proper approach - post it elsewhere.

  8. Re: this declaration may not have extern "C" linkage while portingC++

    Bob Koehler wrote:
    > In article , writetosanjesh@gmail.com writes:
    >> Im porting a source code base from sunos to HP-UX. While compiling
    >> some sources, Im getting the errors like

    >
    > Which is relavent to VMS why?


    Not.

    But if you think HP-UX and VMS are approx. the same because
    both come from HP, then getting C++ to compiler may be a tough job ...

    Arne

+ Reply to Thread