hello all,

i am working on a project where a 16 bit code has to be changed to a 32 bit code. it is a mfc multiple document interface. when i try to compile a dll file i get a error
"fatel error c1083: Connot open pre compiled header file".
when i set the project setting that not using any precompiled header files it throws some 143 errors... can you please help me to solve this problem...

Thanks
Pravin

Recommended Answers

All 12 Replies

Microsoft has not the best record on backwards compatibility, but you should be able to compile an older project with a newer compiler without too much problem.
Depending on the version of Visual Studio you should have a migration wizard. You should use that to migrate your project file to the new version.
Then you should do a re-compile of all sources in your project. Just a compile won't do. Switching off the pre-compiled headers was a smart move. You cannot use pch of a 16bit version with a 32bit version. The errors you get should give you a clue as to what went wrong. It might be, that you have not set the proper include paths in your project? That's an easy fix. Also there are some headers that have a changed name, like "xyz.h" was changed to "xyz32.h" or so. Make sure your project paths exclude paths of your original installation and only include paths of your current version of VS. Once you've done that you'll see more meaningful errors because now the symbols,definitions etc from the old version are no longer available for your project, so anything that has changed name/parameters/was deprecrated will now flag as such. Then you gotta look for headers/libraries in your new installation directory to include and link the right files. If you need more help then you need to post the errors you are getting.
Hope that kicks you off.

fatel error c1083: Connot open pre compiled header file

Do a rebuild of the project. That will re-create the pch.

once again encountered with the same error...

One thing you can try is to rename your current project folder to <xxx>_backup
Then recreate a completely new MFC - project with the original name. Then copy only the source files from your backup to your new project and add the files to the project including resource files. You should close VS before that and confirm with yes to overwrite files. Now you do not have any compiler generated files in your new project folder. Open the project and build it. If you get errors then proceed as in my first post: adding paths, DLLs etc successively to your project. If that does not work, then I think you have a problem with your VS-installation.

i am just building the dll and encountering the error... is there any seperate prosedure to build the dlls... kindly guide me through...

no - same thing applies. I think the best for you really is to start from a clean sheet like spelled out in ly last post. It does not matter whether your project is a MFC GUI project, DLL, or even commandline application. Start from scratch after making a backup. Create a project of the type you want with the name of the original project, then copy only the new sources into your new project folders (wherever they belong) and add them to the new project. The PCH files are created if have precompiled headers enabled in your project settings. I would stronly recomment to switch them off. They're nothing but a nuisance. It does not make your exe or dll faster, but PCH are only there to make the build-process faster. In my experience the opposite is true, because of issues like yours.

what are the different type of dlls which can be coded with visual studio 6.0 and what are its properties....
how to find from the file whether it is a specific type of DLL?

I almost always disable the precompiled header, less problems in the long run.

Visual Studio 6 is not a very good choice of compiler. It is not standard compliant and has many weird snags. A better choice would be VS2005 if you have it. If your source code is from a pre VS6 aera I would expect major problems with MFC API. A lot has changed since. Depending how well the code was written you should be able to migrate the "pure C++2 parts of the DLL/Program, but it's still some feat. As to what kinds of DLL there are? Strictly speaking one, but depending on your compiler/linker options you can change how the DLL is used. MFC (GUI) components, COM-component, ... If you unsure what your current DLL's settings are then you might want open the project with the original compiler and copy the settings and then replicate them when you create the new DLL.

Even after disabling the precompiled header landed up in the same issue...

Do i need to make any changes in project options present in project settings?

I have a class instantiated from a predefined class called CVBControl?
if there a class called CVBControl in 16 bit what is the replacement class or header file to be added for that class...

Regards
Pravin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.