473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Porting CC to GCC

Hi All,

Now I am porting CC to GCC and I have some problems.
Would you mind tell me some document which have some description how to port
CC to GCC ??

Thank you very much.
Ryan
Jul 22 '05 #1
5 2838
"Ryan Liu" <yy***@lucent.com> wrote...
Now I am porting CC to GCC and I have some problems.
Would you mind tell me some document which have some description how to port CC to GCC ??


I am not aware of any document for such porting, but if you have
problems with the code, why not post them/it here? We can help,
or direct you to a better newsgroup (depending on the problem).

Victor
Jul 22 '05 #2
Thank you very much for your help.

The problems is following.

Complier:
Gcc Version 2.8.1
OS:
Solaris 2.6

Part Source Code:

class SeqNumSet //: public VIRTUAL Object
{
// DECLARE_MEMBERS(SeqNumSet);
public:
~SeqNumSet();
static SeqNumSet& instance()
{
if (m_instance.get() == 0)
{
// auto_ptr can only be changed by assignment from another auto_ptr
auto_ptr<SeqNumSet> tmp(new SeqNumSet);
m_instance = tmp;
}
return *(m_instance.get());
}

protected: // storer() functions for Object I/O
SeqNum &getSeqNum(int link, int uniqueTag);
const SeqNum &getSeqNum(int link, int uniqueTag) const;

private:
SeqNumSet(); // Singleton constructor must be private
SeqNumSet(const SeqNumSet& other); // defined but not implemented, so any
attempts to copy are stopped
SeqNumSet& operator =(SeqNumSet& other); // ditto

Dictionary sets; // From IntegerCache linkNum -> Dictionary(
// IC(uniqueTag) -> new SeqNum
//static auto_ptr<SeqNumSet> m_instance;
static auto_ptr<SeqNumSet> m_instance;
};

Error Message:
warning: ANSI C++ forbids declaration `auto_ptr' with no type
parse error before `;'
warning: `class SeqNumSet' only defines private constructors and has no
friends
In function `static class SeqNumSet & SeqNumSet::instance()':
(Each undeclared identifier is reported only once
for each function it appears in.)
`auto_ptr' undeclared (first use this function)
parse error before `>'
confused by earlier errors, bailing out

I don't know why it has this error when I porting CC to GCC.
I think the problems is the line:
static auto_ptr<SeqNumSet> m_instance;
Cound you mind giving some suggestion how to fix this error?

I am very appreciated for your help.

Ryan
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:kT6_b.376225$xy6.1944214@attbi_s02...
"Ryan Liu" <yy***@lucent.com> wrote...
Now I am porting CC to GCC and I have some problems.
Would you mind tell me some document which have some description how to

port
CC to GCC ??


I am not aware of any document for such porting, but if you have
problems with the code, why not post them/it here? We can help,
or direct you to a better newsgroup (depending on the problem).

Victor

Jul 22 '05 #3
In article <c1********@netnews.proxy.lucent.com>,
"Ryan Liu" <yy***@lucent.com> wrote:
Hi All,

Now I am porting CC to GCC and I have some problems.
Would you mind tell me some document which have some description how to port
CC to GCC ??


That depends heavily on several things. You might want to post some of
small part of the actual code that your are having trouble with, along
with what your actual problems are.

Jul 22 '05 #4

In article <c1********@netnews.proxy.lucent.com>, "Ryan Liu" <yy***@lucent.com> wrote:

[snip]
Error Message:
warning: ANSI C++ forbids declaration `auto_ptr' with no type
parse error before `;'
warning: `class SeqNumSet' only defines private constructors and has no
friends
In function `static class SeqNumSet & SeqNumSet::instance()':
(Each undeclared identifier is reported only once
for each function it appears in.)
`auto_ptr' undeclared (first use this function)
parse error before `>'
confused by earlier errors, bailing out
[snip] I am very appreciated for your help.


Make sure that you've included <memory> somewhere earlier in the
code, and change all of the occurrences of "auto_ptr" to "std::auto_ptr".

Jul 22 '05 #5
Clark Cox wrote:
In article <c1********@netnews.proxy.lucent.com>, "Ryan Liu" <yy***@lucent.com> wrote:

[snip]
Error Message:
warning: ANSI C++ forbids declaration `auto_ptr' with no type
parse error before `;'
warning: `class SeqNumSet' only defines private constructors and has no
friends
In function `static class SeqNumSet & SeqNumSet::instance()':
(Each undeclared identifier is reported only once
for each function it appears in.)
`auto_ptr' undeclared (first use this function)
parse error before `>'
confused by earlier errors, bailing out


[snip]
I am very appreciated for your help.

Make sure that you've included <memory> somewhere earlier in the
code, and change all of the occurrences of "auto_ptr" to "std::auto_ptr".


Or change SeqNumSet::instance() to be:

SeqNumSet& SeqNumSet::instance()
{
static SeqNumSet m_instance;

return m_instance;
}

Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Edward | last post by:
Years ago I wrote an app in VB 4.0 16 bit. The program is still selling, but the clients want to upgrade to 32 bit. Should I go for VB 4.0 32 bit, or version 5, or version 6? There is only a...
2
by: eichin | last post by:
One of my recent projects has involved taking an accretion of sh and perl scripts and "doing them right" - making them modular, improving the error reporting, making it easier to add even more...
2
by: Anand | last post by:
Hi Are there any tools that would help in porting code from Pyton 2.3 to 2.4 ? I have gone through the whatsnew documents and created a document comparing Python 2.4 to 2.3. But so far has not...
5
by: David | last post by:
Hi everyone, I have a ActiveX EXE component written in VB6. This ActiveX EXE exposes various public methods that can be called by several other independent Windows EXE applications (also written...
4
by: golu | last post by:
Has any body done the porting from oracle to sql server, what were the issues in porting the data bases? Also suggest some resources which can be helpful in the porting project TIA Golu
4
by: Chris Travers | last post by:
Hi all; A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light,...
4
by: Ian | last post by:
I would like to hear from others who have considered and/or ported code from traditional C++ to C++/CLI. The class library I am considering porting to C++/CLI was written in traditional C++ with...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
5
by: shobhah | last post by:
Hi, We have a complete succsssfully working product on 32bit sparc solaris machine for which compiler used is CC 5.8 Now we are migarting our product from 32 bit to 64bit sparc solaris machine....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.