473,394 Members | 1,706 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,394 software developers and data experts.

Question Concerning Converting a VS97 C++ DLL to VS2003 Code Base

I am working on a project converting a DLL originally written in C++ using
Visual Studio 97 accessing a SQL 6.5 data base to VS.Net 2003 and SQL Server
2000. I would very much appreciate any suggestions and/or references to
good sources for information about issues I am likely to encounter along the
way.

My immediate issue, however, is that after opening the old project and
accepting the conversion to VS2003, a build fails with five instances of
"fatal error C1083: Cannot open precompiled header file: '.\Debug/*.pch': No
such file or directory" -- one for each of the five .cpp files in the
project. In each case the line flagged in the .cpp file is the #include
reference to stdafx.h. There definitely is a stdafx.h file in the project
directory. It's contents are as follows:

#if !defined(AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C88 90AC10000__INCLUDED_)

#define AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C8890AC10000 __INCLUDED_

// stdafx.h : include file for standard system include files,

// or project specific include files that are used frequently, but

// are changed infrequently

//

#include <afx.h>

#include <afxwin.h>

#include <afxmt.h> // for synchronization objects

#include <afxext.h>

#include <afxisapi.h>

//{{AFX_INSERT_LOCATION}}

// Microsoft Developer Studio will insert additional declarations
immediately before the previous line.

#endif //
!defined(AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C88 90AC10000__INCLUDED)
Running the build with a /Fc flag generates a mess of errors. Do I need to
deal with each of those individually, or is there something specific
regarding stdafx differences between VS97 and VS2003 that may the the source
of the errors? Is it possible that I might be able to get around this by
simply changing the contents of stdafx.h? I tried creating a new MFC DLL
project and then using the stdafx.* files VS2003 created for it to replace
those in the original project, but that did not affect the C1083 errors.
Any ideas as to what might be my best (and easiest) way through this?

Any help in sorting out this issue and any others regarding moving this code
from VS97 to VS2003 will be most appreciated. Thanks!

All the best,

will

--

William F. Zachmann, President
Canopus Research, Inc.
http://www.canopusresearch.com


Nov 16 '05 #1
1 3357
What are the project compiler settings for stdafx.h. It should have "Create
precompiled header" (i.e.) /Yc set.

Ronald Laeremans
Visual C++ team

"William F. Zachmann" <wf*@NOcanopusresearchSPAM.com> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
I am working on a project converting a DLL originally written in C++ using
Visual Studio 97 accessing a SQL 6.5 data base to VS.Net 2003 and SQL Server 2000. I would very much appreciate any suggestions and/or references to
good sources for information about issues I am likely to encounter along the way.

My immediate issue, however, is that after opening the old project and
accepting the conversion to VS2003, a build fails with five instances of
"fatal error C1083: Cannot open precompiled header file: '.\Debug/*.pch': No such file or directory" -- one for each of the five .cpp files in the
project. In each case the line flagged in the .cpp file is the #include
reference to stdafx.h. There definitely is a stdafx.h file in the project
directory. It's contents are as follows:

#if !defined(AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C88 90AC10000__INCLUDED_)
#define AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C8890AC10000 __INCLUDED_

// stdafx.h : include file for standard system include files,

// or project specific include files that are used frequently, but

// are changed infrequently

//

#include <afx.h>

#include <afxwin.h>

#include <afxmt.h> // for synchronization objects

#include <afxext.h>

#include <afxisapi.h>

//{{AFX_INSERT_LOCATION}}

// Microsoft Developer Studio will insert additional declarations
immediately before the previous line.

#endif //
!defined(AFX_STDAFX_H__0893D76C_BC95_11D0_A4F4_C88 90AC10000__INCLUDED)
Running the build with a /Fc flag generates a mess of errors. Do I need to deal with each of those individually, or is there something specific
regarding stdafx differences between VS97 and VS2003 that may the the source of the errors? Is it possible that I might be able to get around this by
simply changing the contents of stdafx.h? I tried creating a new MFC DLL
project and then using the stdafx.* files VS2003 created for it to replace
those in the original project, but that did not affect the C1083 errors.
Any ideas as to what might be my best (and easiest) way through this?

Any help in sorting out this issue and any others regarding moving this code from VS97 to VS2003 will be most appreciated. Thanks!

All the best,

will

--

William F. Zachmann, President
Canopus Research, Inc.
http://www.canopusresearch.com

Nov 16 '05 #2

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

Similar topics

4
by: hostmaster | last post by:
Hi, I'm quite new to Python and I am reading this book called 'Core Python Programming' by Wesley J. Chun. I think that this is not a new book but I believe some of the points are still valid....
2
by: Paolo | last post by:
I imported a VC++6.0 project into VC++7.1. The conversion operation makes a mess with Preprocessor Definitions, adding a "$(NoInherit)" for each file. For example: I had a DLL project in VC++6.0...
10
by: chris | last post by:
I'm not sure if this is a bug being caused by visual studio, or by the vb compiler itself. I have good size solution (33 projects) and am consistently having a problem with one project.. ...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
15
by: Joseph Geretz | last post by:
OK, I'll admit it up front - I just don't get it. Here's our previous VS2003 development model. Developers develop the WS solution on their own workstations, using their own IIS web servers...
5
by: Stan R. | last post by:
Greetings. I have a couple of questions concerning CSS layouts, as apposed to the old <tablemethod for creating layouts . Even after spending the last few days searching all over Google Groups, I...
9
by: Mike Hofer | last post by:
In a large application I'm working on (ASP.NET 1.1, VS2003), we have a base class that wraps stored procedures. Essentially, this base class (StoredProcedureBase) encapsulates the code to set up...
6
by: Ben Thomas | last post by:
Hi, Is this code okay and compliant with the standard. As far as I understand it is correct but I just want to make sure. Thank you, Ben. ----
0
by: KJ | last post by:
Hi! I recently converted an application from VS2003 to VS2005. The application consists of a main 'unmanaged C++ executable' which calls a managed C++ .dll. The .dll basically launches a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.