Linker errors
I'm having extreme problems in porting my code to VC 7 (from VC 6) mainly regarding linker errors.
Does anyone know why I'm getting errors that :
1) Cannot find PCH files and
2) why it cannot find obj files
My project within VC 6 compiles beautifully and without linker errors but porting it over to VC 7 is like a dogs dinner!! never have i encountered so many problems in doing, in the words of M$, a reletively easy task!
Regards
John
[489 byte] By [
Vaderman] at [2007-11-18 22:12:15]

# 2 Re: Linker errors
I've deleted all the Release and Debug directories and just imported my source files but it still gives me errors about missing PCH files. I ended up having to do a quick fix in my Property setup in that I've set up the option of Generate Preprocessed File with the flag set to Without Line Numbers ( /EP /P). This can be found in Configuration Properties ->C++->Preprocessor. If I remove this flag it complains like 'ell!!
Also, I'm getting LINK : error LNK2001: unresolved external symbol _wWndMainCRTStartup. It had originally been set up as WndMainCRTStartup.
I have no idea as to why its throwing up all these problems. Microsoft stated that porting legacy code was easy!! YEAH, RIGHT!
# 3 Re: Linker errors
when u started ure app in vc6, did u check shared dll option or used statically link dll. it's possible that ure app, when ure trying to build it in vc7 is unable to link to one or more dll's that u used in vc6.
i never tried to convert from vc6 to vc7, but i encountered some similar linking problems.
# 4 Re: Linker errors
I have about 40+ projects within a solution and 39 of these are statically linked Dlls, but I don't understand why the options should all of a sudden throw up a linker error of WndMainCRTStartup from within my main project. :confused:
Any Ideas, as I've completely run out of them!
# 5 Re: Linker errors
Did you just open the VC6 DSW file? Or, did you create a new project in VC7, then add all your source files?
It sounds like there is a project setting "mismatch" between the VC6 and VC7 versions. I've upgraded a number of projects, and it was as easy as opening the DSW in VC7, and letting Visual Studio do all the "conversion".
Viggy
# 6 Re: Linker errors
I created a new project in VC7 and added the source files, and projects. A colleague of mine has done the same and he's got it to work first time! :o so I dunno wots the difference as I've had a look at his property settngs and they match!
# 7 Re: Linker errors
Well, then you really shouldn't be complaining about "upgrading" from VC6 to VC7. You're not upgrading anything, you're trying to compile older source code on a new compiler.
Go back to your original VC6 project, and open the DSW file inside of VC7. This should import all of the project settings properly, converting settings where it needs to.
Viggy