Problem compiling a program

Hi all, recently i had to work on a program which was running ok on VC++ 6. Due to certain restrictions i only can work with visual studio 2005 express beta 2. When i tried to compile the program in VS 2005 express beta 2, i got these errors which never occurred in VC++ 6:



Compiling...

STDAFX.CPP

Compiling...

Database.cpp

DatabaseMarpos.cpp

DataCom.CPP

DBMarpos.cpp

EBlockEntry.cpp

EBlockLabel.cpp

EdcsSettings.cpp

EDCSSetupDialog.cpp

extendedEBlock.cpp

fileDB.cpp

FisApiInterface.cpp

c:\hsanew\datacom\fisapiinterface.cpp(400) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

GenericInput.cpp

HSALabel.cpp

c:\hsanew\datacom\hsalabel.cpp(151) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsalabel.cpp(162) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

HSALabelOptionsDialog.cpp

HSAParameters.cpp

c:\hsanew\datacom\hsaparameters.cpp(78) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparameters.cpp(137) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparameters.cpp(139) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparameters.cpp(268) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

HSAParser.cpp

c:\hsanew\datacom\hsaparser.cpp(211) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(233) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(303) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(345) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(373) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(405) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(411) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsaparser.cpp(528) : error C2143: syntax error : missing ',' before '=='

c:\hsanew\datacom\hsaparser.cpp(529) : error C2143: syntax error : missing ';' before '{'

HSATestParams.cpp

c:\hsanew\datacom\hsatestparams.cpp(140) : error C2065: 'ii' : undeclared identifier

HSATranslate.cpp

c:\hsanew\datacom\hsatranslate.cpp(153) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(171) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(173) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(175) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(177) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(179) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(181) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(182) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(185) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(197) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(201) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(227) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(249) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(301) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(349) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(584) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1043) : warning C4996: '_itoa' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdlib.h(460) : see declaration of '_itoa'

c:\hsanew\datacom\hsatranslate.cpp(1205) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1210) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1217) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1226) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1232) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1237) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1242) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1250) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1260) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1269) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1277) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1288) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1299) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1308) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1317) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1326) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1335) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1344) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1353) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1362) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1375) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1521) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1523) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1525) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1527) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1529) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1543) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1548) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1549) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\hsatranslate.cpp(1558) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\hsatranslate.cpp(1562) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

LabelPrintOptionsDlg.cpp

LineDevice.cpp

c:\hsanew\datacom\linedevice.cpp(57) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(58) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(59) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(60) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(61) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(62) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(63) : warning C4996: 'sprintf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(317) : see declaration of 'sprintf'

c:\hsanew\datacom\linedevice.cpp(263) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\linedevice.cpp(576) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\linedevice.cpp(663) : error C2440: '=' : cannot convert from 'const char *' to 'TCHAR *'

Conversion loses qualifiers

c:\hsanew\datacom\linedevice.cpp(682) : error C2440: '=' : cannot convert from 'const char *' to 'TCHAR *'

Conversion loses qualifiers

c:\hsanew\datacom\linedevice.cpp(689) : error C2440: '=' : cannot convert from 'const char *' to 'TCHAR *'

Conversion loses qualifiers

Generating Code...

Compiling...

Log.cpp

MAINFRM.CPP

c:\hsanew\datacom\mainfrm.cpp(610) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\mainfrm.cpp(2625) : error C2065: 'i' : undeclared identifier

c:\hsanew\datacom\mainfrm.cpp(2648) : error C2228: left of '.SetAt' must have class/struct/union

MarposProductEntry.cpp

MessageBus.cpp

msghandlerctrl.cpp

OptionsDialog.cpp

OverrideOptionsDlg.cpp

PasswordEntryDialog.cpp

PasswordSetupDialog.cpp

ProductDlg.cpp

c:\hsanew\datacom\productdlg.cpp(81) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

c:\hsanew\datacom\productdlg.cpp(172) : error C2143: syntax error : missing ',' before '=='

c:\hsanew\datacom\productdlg.cpp(173) : error C2143: syntax error : missing ';' before '{'

c:\hsanew\datacom\productdlg.cpp(184) : fatal error C1903: unable to recover from previous error(s); stopping compilation

RegisterWIN32.cpp

c:\hsanew\datacom\registerwin32.cpp(82) : warning C4996: 'strcpy' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\string.h(56) : see declaration of 'strcpy'

c:\hsanew\datacom\registerwin32.cpp(173) : warning C4996: 'strcpy' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\string.h(56) : see declaration of 'strcpy'

c:\hsanew\datacom\registerwin32.cpp(379) : warning C4996: 'strcpy' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\string.h(56) : see declaration of 'strcpy'

c:\hsanew\datacom\registerwin32.cpp(574) : error C2440: '=' : cannot convert from 'const char *' to 'TCHAR *'

Conversion loses qualifiers

serialport.cpp

sqlDB.cpp

StationEditDlg.cpp

StationsDlg.cpp

StringDlg.cpp

c:\hsanew\datacom\stringdlg.cpp(39) : warning C4996: 'sscanf' was declared deprecated

c:\program files\microsoft visual studio 8\vc\include\stdio.h(291) : see declaration of 'sscanf'

TRAYICON.CPP

c:\program files\microsoft platform sdk\include\mfc\afxconv.h(62) : fatal error C1083: Cannot open include file: 'atlconv.h': No such file or directory

VMIDlg.cpp

Generating Code...

Creating browse information file...

Microsoft Browse Information Maintenance Utility Version 8.00.50215

Copyright (C) Microsoft Corporation. All rights reserved.

BSCMAKE: error BK1506 : cannot open file '.\Debug\ProductDlg.sbr': No such file or directory

Build log was saved at "file://c:\HsaNew\datacom\Debug\BuildLog.htm"

DATACOM - 14 error(s), 77 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 



Could someone be kind enough to tell me whats the possible problem that i am facing here Thanks in advance.



Answer this question

Problem compiling a program

  • Frank ORourke

    Where shld i check I was scanning through VS2005 but i can't seem to find the linker settings. Would be grateful if u can gimme a hand with where to find and edit the settings.
    Thanks :)

  • TWeiler

    Does it exist in the folder that it expects it to be You can work that out from the path in the error you're getting


  • Motris

    Since you are using the express build of VC2005, the PSDK (where mpr.lib is) is not included and you might need to install it.

    The below link might be helpful:
    http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx


    Thanks,
      Ayman Shoukry
      VC++ Team

  • Jens Leidel

    I have no idea what oldnames.lib is, although I'd guess that it's something to do with supporting old code

    If there's nothing there, then it must be implicit somewhere.  Can you move a copy of this lib file to the directory it's looking at ( or conversely, is that where it is already )

    It's a hack, but I'm thinking more in terms of getting a step closer to figuring out what is going on....


  • devdept

    Yeah, I'm in exactly the same boat, I've just done the exact same thing for someone.



  • RobertPalmer

    Well i got ard to killing all the previous errors. Warnings abt deprecated declarations i decided to leave untouched first. Sad to say, i think VS 2005 doesnt like VC6 very well.


    Compiling resources...

    Compiling manifest to resources...

    Linking...

    LINK : fatal error LNK1181: cannot open input file '..\..\program files\microsoft visual studio 8\microsoft platform sdk\lib\Mpr.Lib'

    Creating browse information file...

    Microsoft Browse Information Maintenance Utility Version 8.00.50215

    Copyright (C) Microsoft Corporation. All rights reserved.

    Build log was saved at "file://c:\HsaNew\datacom\Debug\BuildLog.htm"

    DATACOM - 1 error(s), 106 warning(s)

    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


     


    Oh wells, looks like i must look for some alternative solution.

  • 六子

    LINK : fatal error LNK1181: cannot open input file '..\..\program files\microsoft visual studio 8\microsoft platform sdk\lib\Mpr.Lib'

    Oh, on closer inspection of the error i realised that "C:\Program Files\Microsoft Visual Studio 8\Microsoft Platform SDK\" actually does not exist on my comp. My Microsoft Platform SDK folder is on "C:\Program Files\Microsoft Platform SDK\" I guess that might be where the prob lies, but it wld seem abit messy to create the Microsoft Platform SDK folder into my MS VS8 folder and throw in one mpr.lib file just to make the program run. :(

  • Hemant Kanoujiya_29

    Right click on the project name, choose properties. 

    Configuration Properties/Linker/Input

    Additional Dependancies is at the top.


  • Kian01

    >If there's nothing there, then it must be implicit somewhere.  Can you move a copy of this lib file to the directory it's looking at ( or conversely, is that where it is already )

    Im not too sure which directory this lib file(oldnames.lib) is looking at but i did a search for it on my comp and found it in:

    C:\Program Files\Microsoft Platform SDK\Lib\AMD64

    C:\Program Files\Microsoft Platform SDK\Lib\IA64

    C:\Program Files\Microsoft Visual Studio 8\VC\Lib

    Hmmm... shld i move the mpr.lib file to C:\Program Files\Microsoft Visual Studio 8\VC\Lib It already exists in the other 2 folders.

  • Ashok_Roy

    I see it, my current settings are:

    Additional Dependencies : oldnames.lib
    Ignore All Default Libraries: No

    Rest of the options are all blank. Whats oldnames.lib o.O

  • Saqib Ullah

    You're facing the problem that VC6 is a really poor C++ implimentation, and VC2005 is an excellent one.  You're also facing the problem of changes in the framework in the last 5 years.

     warning C4996: 'sprintf' was declared deprecated

    all the unsafe C style string functions have been deprecated.  Why are you using so many of them instead of CString or std::string The new versions have _s appended to the old name and take buffer sizes as arguments, so no buffer overruns can occur.

    error C2440: '=' : cannot convert from 'const char *' to 'TCHAR *'

    I'd have to see the code, but it looks like TCHAR is now a BSTR, instead of a char *.

    error C2143: syntax error : missing ',' before '=='

    You need to post some code to get help with errors like this

     error C2065: 'i' : undeclared identifier

    in VC6, if you did this:

    for (int i =0;i<x;++i)

    then the variable i was visible after the loop ended.  This is against the C++ standard, and has been fixed in VC since 2002.  You need to declare i before the for statement instead of inside it.

    On first glance, I think that covers most of your errors.  I believe there's a #define you can use to make the old, unsafe C string functions work, or you can #pragma out that warning if you prefer.  Or you can move to the newer functions, which are safer, but I'm not sure if they are standard.  Post again when you've killed the errors you can with this advice, and I'd be happy to help more. 


  • Ralph Rivas

    Thanks a million for your fast reply cgraus, the thing is i'm not the originator of this code but i'm required to amend and add more functionalities to this code. Its developed pretty long ago i think. Will get back to you when i've killed all the errors i can. Thanks again :)
  • killauea

    I've installed the Microsoft Platform SDK already. I've already included the directory where mpr.lib is when i compiled and that didnt work. Then i proceeded to add ALL 3 folders where mpr.lib can be found and it still doesn't work.


    <Directories

    Include="C:\Program Files\Microsoft Platform SDK\Include\atl;C:\Program Files\Microsoft Platform SDK\Include;C:\Program Files\Microsoft Platform SDK\Include\mfc;$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include"

    Library="C:\Program Files\Microsoft Platform SDK\Lib\IA64;C:\Program Files\Microsoft Platform SDK\Lib\AMD64;C:\Program Files\Microsoft Platform SDK\Lib;$(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib"

    Path="C:\Program Files\Microsoft Platform SDK\Bin;$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(PATH)"

    Reference="$(FrameworkDir)$(FrameworkVersion)"

    Source="$(VCInstallDir)crt\src"

    />


     



    Added the filepaths to the "Library" section, did the deletion of the .dat file, restarted VS2005 and i still ended up with the same error :(


  • mgattani

    LINK : fatal error LNK1181: cannot open input file '..\..\program files\microsoft visual studio 8\microsoft platform sdk\lib\Mpr.Lib'

    The fact that it gives you this path make me think that the lib file in the linker settings includes this path info, or at least some macro that evolves to this.  Have you checked, and made sure it says mpr.lib, with no path info at all Then it will be found by adding the full path to your library path settings.


  • Problem compiling a program