473,785 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_ST DAFX_H__0893D76 C_BC95_11D0_A4F 4_C8890AC10000_ _INCLUDED_)

#define AFX_STDAFX_H__0 893D76C_BC95_11 D0_A4F4_C8890AC 10000__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_LO CATION}}

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

#endif //
!defined(AFX_ST DAFX_H__0893D76 C_BC95_11D0_A4F 4_C8890AC10000_ _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 3384
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*@NOcanopusr esearchSPAM.com > wrote in message
news:un******** ******@TK2MSFTN GP10.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_ST DAFX_H__0893D76 C_BC95_11D0_A4F 4_C8890AC10000_ _INCLUDED_)
#define AFX_STDAFX_H__0 893D76C_BC95_11 D0_A4F4_C8890AC 10000__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_LO CATION}}

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

#endif //
!defined(AFX_ST DAFX_H__0893D76 C_BC95_11D0_A4F 4_C8890AC10000_ _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
1639
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. There is this part in the book where it says: "In Python, standard types are not classes, so creating integers and strings does not involve instantiation".
2
6647
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 where the definitions were: _UNICODE,_DEBUG,_WIN32_DCOM,WIN32,_WINDOWS,_WINDLL,_AFXDLL,_USRDLL In VC++7.1, these are the preprocessor definitions of the project (right-click the project in Solution Explorer and choose Properties -> C++ ->...
10
3074
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.. Basically everytime I build, I get the compiler error bc30456...which is basically that some local variable is not declared. However, the variable is declared...and basically if I change its declaration from private to protected the project will...
29
3579
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 one data field - but i'm not sure) :-) Background info:
15
4232
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 mapped to the local devleopment folder. Project compiles to a subfolder .\bin. To deploy, the asmx page and bin subfolder are copied to the production server. So now I upgrade to VS2005. OK, so except for the name, everything is changed. No more...
5
1797
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 haven't not been able to find a solution to my collective dilemma, and I hope some of you fine folks here in these neck of the UseNet woods might be able to share some wisdom with a fellow coder. My questions are in regard to what are the proper...
9
1504
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 the connection, transaction, command and parameters required to invoke a stored procedure on our SQL Server database. It provides helper methods that simplify the process of invoking the stored procedure so that our data access classes can make the...
6
1221
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
1040
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 separate form. The application use to work fine in VS2003. Now that I have converted to VS2005 the main executable is working but an exception gets
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9954
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...
1
7502
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
5383
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...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
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.