Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2007

Tip: Looking for answers? Try searching our database.

Using VS2005 on a project that earlier used VS2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TonyJ - 28 Jun 2007 09:45 GMT
Hello!

What is the right way to go when I have a C++ project that earlier used
VS2003.

When I compile now I get a lot of compile error.

//Tony
SvenC - 28 Jun 2007 10:04 GMT
Hi Tony,

> Hello!
>
> What is the right way to go when I have a C++ project that earlier used
> VS2003.
>
> When I compile now I get a lot of compile error.

Managed or unmanaged C++?

For managed: learn the new syntax for C++/CLI and change the code.

For unmanaged: what are the errors? Typically you will get a lot of warnings
about unsafe APIs which you should replace with safer versions.

--
SvenC
TonyJ - 28 Jun 2007 10:19 GMT
Hello!

It's manage code.
Is the best or maybe the only way to take each compile error and correct it.
I just wonder if there exist some way to let the vc2005 behave like vs2003
and compile without error.

//Tony

> Hi Tony,
>
[quoted text clipped - 14 lines]
> --
> SvenC
Boris - 28 Jun 2007 10:26 GMT
> Hello!
>
[quoted text clipped - 4 lines]
> vs2003
> and compile without error.

/clr:oldSyntax might help (although I never tried it as I upgraded from  
Managed C++ to CLI/C++).

Boris

> [...]
Jochen Kalmbach [MVP] - 28 Jun 2007 10:26 GMT
Hi TonyJ!

> It's manage code.

You have three chances:
1. Set your compiler option to "/clr:oldsynatx"
2. Review your code line-by-line
3. Use the "VC++ 2003 Managed Extensions to VC++2005 C++/CLI Conversion
Tool"
http://www.microsoft.com/downloads/details.aspx?familyid=a3581805-1af2-4c34-9d0e
-6029cc078441&displaylang=en


I would prefer the option 3 ;)

Greetings
  Jochen
Aek - 28 Jun 2007 10:06 GMT
> Hello!
>
[quoted text clipped - 4 lines]
>
> //Tony

Are you getting errors or warnings? Or both..
Please send a sample of the errors and warning you get.

You should be able to migrate from 2003 C++ projects to 2005 C++
projects fairly easily, but it depends on how compliant your C++ code
was.
Do you have any managed code in the C++ project?

Are you using many of the older C style functions? (such as ones found
in stdio.h). Using these will often give you warnings. Sometime you
can simply disable these warnings for the time being.

Josh

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.