473,842 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2871
"Ryan Liu" <yy***@lucent.c om> 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<SeqNum Set> tmp(new SeqNumSet);
m_instance = tmp;
}
return *(m_instance.ge t());
}

protected: // storer() functions for Object I/O
SeqNum &getSeqNum(i nt link, int uniqueTag);
const SeqNum &getSeqNum(i nt 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<SeqNum Set> m_instance;
static auto_ptr<SeqNum Set> 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::inst ance()':
(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<SeqNum Set> m_instance;
Cound you mind giving some suggestion how to fix this error?

I am very appreciated for your help.

Ryan
"Victor Bazarov" <v.********@com Acast.net> wrote in message
news:kT6_b.3762 25$xy6.1944214@ attbi_s02...
"Ryan Liu" <yy***@lucent.c om> 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********@net news.proxy.luce nt.com>,
"Ryan Liu" <yy***@lucent.c om> 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********@net news.proxy.luce nt.com>, "Ryan Liu" <yy***@lucent.c om> 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::inst ance()':
(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********@net news.proxy.luce nt.com>, "Ryan Liu" <yy***@lucent.c om> 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::inst ance()':
(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::inst ance() to be:

SeqNumSet& SeqNumSet::inst ance()
{
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
7359
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 tiny budget for this, and I don't want to do any rewrites so VB.NET is out! Also, are there any "gotchas" that I need to be aware of? many thanks in advance and sorry if this question has been asked and answered before - I did a search and...
2
3377
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 features to them. "Of course," I'm redoing them in python - much of the cut&paste reuse has become common functions, which then get made more robust and have a common style and are callable from other (python) tools directly, instead of having to...
2
1911
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 been able to find any tool that will signal code in Python 2.3 that can cause errors in Python 2.4 . rgds
5
2400
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 in VB6). I would like to port the ActiveX EXE component it to dotNet. What type of project that I should port it to? A Windows Service or what? Please suggest. The thing is that I will not be porting the existing Windows EXE
4
2013
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
2402
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, fast database abstraction layer which conforms to the behavior of the MySQL functions in PHP. This means that a large amount of porting work could be made simple using this porting layer if the application was originally used PHP's native MySQL...
4
1990
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 STL and a touch of MFC. It represents the back end to my applications and, among a number of other things, it performs all file I/O and data management operations (i.e. no GUI). Why would I consider porting it to C++/CLI when it works just...
34
4085
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
5
3035
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. While porting we need 64 bit compiler issues for our application product which is wriiten in completely C++. We tried with -xarch=v9 and -xport64=full compiler options to find out 64bit porting problems. But we did not find any issues for our...
0
9717
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10952
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10683
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10320
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9459
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7862
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5699
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4096
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3148
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.