Thread: msvc++ help

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    3

    msvc++ help

    hello im trying to do this (should be easy) tut in msvc++ 6. and im getting some errors.

    here is the tut

    http://www.functionx.com/visualc/lib...cstaticlib.htm

    and here is the error.

    Code:
    --------------------Configuration: MFCExtTest - Win32 Debug--------------------
    Compiling...
    MFCExtTestDlg.cpp
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(104) : error C2039: 'OnCalculateBtn' : is not a member of 'CMFCExtTestDlg'
            c:\documents and settings\james\my documents\bens\c++\mfcexttest\mfcexttestdlg.h(14) : see declaration of 'CMFCExtTestDlg'
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(109) : error C2065: 'UpdateData' : undeclared identifier
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(112) : error C2065: 'm_Number1' : undeclared identifier
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(122) : error C2065: 'm_Number2' : undeclared identifier
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(134) : error C2065: 'm_Result' : undeclared identifier
    C:\Documents and Settings\James\My Documents\bens\c++\MFCExtTest\MFCExtTestDlg.cpp(134) : error C2228: left of '.Format' must have class/struct/union type
    Generating Code...
    Compiling...
    MFCExtTest.cpp
    Generating Code...
    Error executing cl.exe.
    i know its a kind of big ask. but i would appreciate it if someone could to me what going wrong

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    MFC, DLG, and Button all suggest that you have tried to compile a program for Windows using the MFC library. Those topics are usually covered elsewhere on this site. However, the error messages you are getting seem to be of a general nature, and not necessarily related to Windows programming per se'. In particular, undeclared identifier means that the indicated variable you are trying to use on the indicated line is out of scope. That means that you didn't declare the variable, didn't pass the variable to the function in which the indicated line is found, didn't include the header file where the variable is declared, or the header file where the variable is declared didn't link to your program successfully. The last error message you have listed means that there is an extra character in front of the variable called Format. That extra character is a period. The compiler is interpretting the period as indicating that there should be an instance of a class or a struct on the left hand side of the period, like this, myObject.Format. Maybe there is a variable name to the left of the period, but if the variable name is not identified, for example if it's one of the above variables not identified, then to the compiler it doesn't exist. Fix the unidentified variable problem and recompile. The last error may fix itself when you do.

    Edit: How the "bleep" did I get to the Windows Board?? Forget the first two lines, above, they are inappropriate. The remainder of the post holds, though.
    Last edited by elad; 03-15-2004 at 09:34 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble with MSVC, Mingw32 and Code::Blocks
    By Brafil in forum C Programming
    Replies: 11
    Last Post: 10-12-2009, 11:34 AM
  2. MSVC resource script in Dev-C++
    By josh_d in forum Windows Programming
    Replies: 0
    Last Post: 03-17-2004, 04:07 PM
  3. MSVC behaves strange
    By ripper079 in forum C++ Programming
    Replies: 4
    Last Post: 10-28-2003, 08:34 PM
  4. Blender3D, XML, and MSVC ???
    By Grumpy_Old_Man in forum Game Programming
    Replies: 0
    Last Post: 08-24-2003, 07:00 PM
  5. GCC (cygwin) much faster than MSVC, Borland?
    By Sargnagel in forum C Programming
    Replies: 15
    Last Post: 08-05-2003, 03:15 AM