Error lnk1120 afxwin.h

error lnk1120 afxwin.h

Miguel_2D_unwrapper.lib: fatal error LNK1120: 1 unresolved externals. I use Microsoft Windows SDK 7.1 (C++) combined with 'Microsoft Visual C++. Debug/fstreamTest.exe: fatal error LNK1120: 3 unresolved externals i've had these once in the past that i can #include "afxwin.h" #include "afxext.h". For compilers that support precompilation, includes "wx.h". Debug/array_test.exe: fatal error LNK1120: 3 unresolved externals. error lnk1120 afxwin.h

Error lnk1120 afxwin.h - similar. Completely

Thread: link problems ...

  1. September 22nd, 1999, 03:12 PM#1

    link problems ...

    i hesitate to ask this question because it is the 2nd "link" problem i've had. i've solved my first one, and it was a conflict with multithreaded debug and multithreaded debug dll stuff.

    here are the link errors i'm getting at this time:

    Linking...
    nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
    Debug/fstreamTest.exe : fatal error LNK1120: 3 unresolved externals


    i've had these once in the past that i can remember, and i solved it somehow, as i recall, with a #define in the .h file. i can't remember for sure though.

    here is the source code that is causing the problem


    #include "afxwin.h"
    #include "afxext.h"
    #include "fstream.h"

    //..+....1....+....2....+....3....+....4....+....5....+....6....+....7..

    //--------------------------------------
    //
    //--------------------------------------
    class fstreamCraig : public fstream{
    private:
    protected:
    public:
    fstreamCraig(const char *, int, int = filebuf:penprot);
    };

    fstreamCraig::fstreamCraig(const char * s, int i1, int i2){
    fstream(s,i1,i2);
    }

    //--------------------------------------
    //
    //--------------------------------------
    int main(int argc, char* argv[])
    {

    fstream myFstream(
    "d:\\fstreamTest.txt"
    ,ios::in

    Can we use MFC and wxWidgets at the same time in Windows?

    Postby renaissance »

    Can we use MFC and wxWidgets at the same time in Windows environment? I tried to do the following in my code

    #include <Afxwin.h>
    #include <Afxtempl.h>
    // For compilers that support precompilation, includes "wx.h".
    #include <wx/wxprec.h>

    #ifdef __BORLANDC__
    #pragma hdrstop
    #endif

    #ifndef WX_PRECOMP
    // Include your minimal set of headers here, or wx.h
    #include <wx/wx.h>
    #endif

    #include "wx/dynarray.h"
    ....

    THen I tried to do the following

    WX_DEFINE_ARRAY_INT(int, CChannel);

    WX_DEFINE_ARRAY(CChannel *, CChannelArray);

    void main()
    {
    //CArray <float,float> PCChannel;
    int m_lNumChannels = 80;
    int m_lNumTimeslices = 100;
    CChannel *pChannel;
    ...

    When I compile the code in VC++ 6, I got the following error. I am wondering if someone can help me with this issue. Thank you

    --------------------Configuration: array_test - Win32 Debug--------------------
    Compiling...
    array_test.cpp
    c:\wxwidgets\wxmsw-2.8.11\mytests\array_test\array_test.cpp(20) : warning C4284: return type for 'CChannelArray::reverse_iterator::operator ->' is 'class CChannel ** ' (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation)

    c:\wxwidgets\wxmsw-2.8.11\mytests\array_test\array_test.cpp(20) : warning C4284: return type for 'CChannelArray::const_reverse_iterator::operator ->' is 'class CChannel *const * ' (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation)

    Linking...

    msvcrtd.lib(MSVCRTD.dll) : error LNK2005: "void * __cdecl operator new(unsigned int,int,char const *,int)" ([email protected]@Z) already defined in nafxcwd.lib(afxmem.obj)

    nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype

    nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype

    nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype

    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv

    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc

    Debug/array_test.exe : fatal error LNK1120: 3 unresolved externals

    Error executing link.exe.

    array_test.exe - 7 error(s), 2 warning(s)

    Thread: Problem Removing MFC

    1. October 30th, 2005, 03:28 PM#1

      Problem Removing MFC

      Hi,

      I had a app using MFC (mostly only CStrings), and I converted it so that it doesn't use MFC. After doing this and selecting "Use Standard Windows Libraries" I get some link errors:

      Code:

      Unbin3 fatal error LNK1120: 3 unresolved externals Unbin3 error LNK2001: unresolved external symbol ___argv Unbin3 error LNK2001: unresolved external symbol ___argc Unbin3 error LNK2001: unresolved external symbol __mbctype Unbin3 error LNK2019: unresolved external symbol __mbctype referenced in function "void __stdcall AfxFormatStrings(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > &,unsigned int,char const * const *,int)" ([email protected]@[email protected][email protected][email protected]@[email protected]@@@@[email protected]@[email protected]) Unbin3 error LNK2019: unresolved external symbol __mbctype referenced in function "public: void __thiscall CEditView::ReadFromArchive(class CArchive &,unsigned int)" ([email protected]@@[email protected]@[email protected])
      The problem is I am not even using the specified functions.
      Is there something else I should have done like removing #include "stdafx.h"?

    2. Re: Problem Removing MFC

      If it was a real MFC app, then it was probably also using the CWinApp class. Have you removed that as well? Have you also removed all CDialogs etc etc?
      Have you cleaned up your stdafx.h file? All references to includes like afxwin.h and other afx... should most likely be removed.

      Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
      My Blog
      Wallpaper Cycler 3.5.0.97

      Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
      ISBN: 978-1-119-42130-6
      [ http://www.facebook.com/professionalcpp ]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  

    Forum Rules




    When I compile this basic WinApp, I get the link errors that follow.
    I'm using a simple "cl minwinap.cpp", but sense I need the right
    options.

    Suggestions?

    TIA,
    Jeff

    (PS- I tried /MTd and /MT but it gives me
    libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    MINWINAP.exe : fatal error LNK1120: 1 unresolved externals)

    /////////////////////////////////begin minwinap.cpp
    #include <afxwin.h>

    class CAppWindow : public CFrameWnd
    {
            public:        
            CAppWindow()
            {

            Create(NULL, "Minimal MFC Application",
                    WS_OVERLAPPEDWINDOW, rectDefault);
            }

    Quote:

    };

    class CWindowApp : public CWinApp
    {
    public:
            virtual BOOL InitInstance();

    Quote:

    };

    BOOL CWindowApp::InitInstance()
    {
    m_pMainWnd = new CAppWindow();
    m_pMainWnd->ShowWindow(m_nCmdShow);
    m_pMainWnd->UpdateWindow();
    return TRUE;

    Quote:

    }

    CWindowApp WindowApp;
    ///////////////////////////end minwinap.cpp

    Compiling...
    MINWINAP.CPP
    Linking...
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
    __endthreadex
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
    __beginthreadex
    Debug/minwinap.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.

    [ Attached Message ]

    From:
    To:
    Date: Thu, 21 Dec 2000 17:06:28 -0800
    Local: Thurs, Dec 21 2000 8:06 pm
    Subject: Simple Compile: Unexpected Link errmsg
    When I compile this basic WinApp, I get the link errors that follow.
    I'm using a simple "cl minwinap.cpp", but sense I need the right
    options.

    Suggestions?

    TIA,
    Jeff

    /////////////////////////////////begin minwinap.cpp
    #include <afxwin.h>

    class CAppWindow : public CFrameWnd
    {
            public:        
            CAppWindow()
            {

            Create(NULL, "Minimal MFC Application",
                    WS_OVERLAPPEDWINDOW, rectDefault);
            }

    Quote:

    };

    class CWindowApp : public CWinApp
    {
    public:
            virtual BOOL InitInstance();

    Quote:

    };

    BOOL CWindowApp::InitInstance()
    {
    m_pMainWnd = new CAppWindow();
    m_pMainWnd->ShowWindow(m_nCmdShow);
    m_pMainWnd->UpdateWindow();
    return TRUE;

    Quote:

    }

    CWindowApp WindowApp;
    ///////////////////////////end minwinap.cpp

    Compiling...
    MINWINAP.CPP
    Linking...
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
    __endthreadex
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
    __beginthreadex
    Debug/minwinap.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.



    ios:ut

    Thread: Problem Removing MFC

    1. October 30th, 2005, 03:28 PM#1

      Problem Removing MFC

      Hi,

      I had a app using MFC (mostly only CStrings), and I converted it so that it doesn't use MFC. After doing this and selecting "Use Standard Windows Libraries" I get some link errors:

      Code:

      Unbin3 fatal error LNK1120: 3 unresolved externals Unbin3 error LNK2001: unresolved external symbol ___argv Unbin3 error LNK2001: unresolved error lnk1120 afxwin.h symbol ___argc Unbin3 error LNK2001: unresolved external symbol __mbctype Unbin3 error LNK2019: unresolved external symbol __mbctype referenced error lnk1120 afxwin.h function "void __stdcall AfxFormatStrings(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > &,unsigned int,char const * const *,int)" ([email protected]@[email protected][email protected][email protected]@[email protected]@@@@[email protected]@[email protected]) Unbin3 error LNK2019: unresolved external symbol __mbctype referenced in function "public: void __thiscall CEditView::ReadFromArchive(class CArchive &,unsigned int)" ([email protected]@@[email protected]@[email protected])
      The problem is I am not even using the specified functions.
      Is there something else I should have done like removing #include "stdafx.h"?

    2. Re: Problem Removing MFC

      If it was a real MFC app, then it was probably also using the CWinApp class. Have you removed that as well? Have you also removed all CDialogs etc etc?
      Have you cleaned up your stdafx.h file? All references to includes like afxwin.h and other afx. should most likely be removed.

      Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
      My Blog
      Wallpaper Cycler 3.5.0.97

      Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
      ISBN: 978-1-119-42130-6
      [ http://www.facebook.com/professionalcpp ]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  

    Forum Rules




    Sucessfull Compilation but Build Fails with FATAL Error Please help

    Hi,

    I am new to this news group, hope to get prompt solution from you, gurus of
    VC.

    Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development
    SDK, I am trying to upgrade my project to VC++.NET,

    below is the code snipplet from the project

    #if WIN_PLATFORM // WIN ONLY
    #include <afxwin.h>
    extern "C" {
    #include "ASCalls.h"
    #include "AVCalls.h"
    #include "PDCalls.h"
    #include "CosCalls.h"
    #include "PICrypt.h"
    #include "PIMain.h"
    };


    After this declaration i am using the code below

    int GetSignatureStatus(const PDDoc& thePDDoc, // [in]: The parent PDDocconst
    PDAnnot& thePDAnnot) // hp b209 ink error The annotation to check
    {
    int intSignedStatus = 0;
    DURING
    const CosObj cosPDAnnot = PDAnnotGetCosObj(thePDAnnot);
    const ASInt32 intPreFlags = PDDocGetFlags(thePDDoc);
    // Ensure valid PDAnnot
    if (!CosObjEqual(cosPDAnnot, CosNewNull()))
    {
    const CosObj cosString = CosDictGet(cosPDAnnot,
    ASAtomFromString("Contents"));
    // Ensure valid CosString
    if (!CosObjEqual(cosString, error lnk1120 afxwin.h, CosNewNull()) && CosString ==
    CosObjGetType(cosString))
    {
    ASInt32 numBytes = 0;
    const char* pchData = CosStringValue(cosString, &numBytes);
    win_btoken BToken;
    .
    .
    .
    .
    }

    My code gets compiled with 0 error 0 warnings in VC++.NET IDE, But when i
    try to build the solution in VC++.NET it says
    1. PrudForm error LNK2019: unresolved external symbol _btoken_destroy
    referenced in function "public: __thiscall btoken::~btoken(void)"
    ([email protected]@[email protected])
    2. PrudForm error LNK2019: unresolved external symbol _btoken_is_captured
    referenced in function "public: int __thiscall
    btoken::is_captured(void)const " ([email protected]@@QBEHXZ)
    3. PrudForm error LNK2019: unresolved external symbol
    _btoken_verify_document referenced in function "public: int __thiscall
    btoken::verify_document(class doc_integrity const &)const "
    ([email protected]@@[email protected]@@Z)
    4. PrudForm error LNK2019: unresolved external symbol _doc_integrity_create
    referenced in function "public: __thiscall
    doc_integrity::doc_integrity(void)" ([email protected]@[email protected])
    5. PrudForm error LNK2019: unresolved external symbol _doc_integrity_destroy
    trafd error net/slip.h in function "public: __thiscall
    doc_integrity::~doc_integrity(void)" ([email protected]@[email protected])
    6. PrudForm error LNK2019: unresolved external symbol
    _doc_integrity_traverse referenced in function "public: int __thiscall
    doc_integrity::traverse(char const *)" ([email protected][email protected]@[email protected])
    7. PrudForm fatal error LNK1120: 7 unresolved externals

    when i double click the error description in the Task List it takes me to a
    resource file which has following code
    java.io.ioexception error=2 no such file or directory Developer Studio generated resource script.
    #include "resource.h"
    #define APSTUDIO_READONLY_SYMBOLS
    ////////////////////////////////////////////////////////////////////////////
    /
    // Generated from the TEXTINCLUDE 2 resource.
    #include "afxres.h"
    ////////////////////////////////////////////////////////////////////////////
    /
    #undef APSTUDIO_READONLY_SYMBOLS
    ////////////////////////////////////////////////////////////////////////////
    /
    // English (U.S.) resources
    #if !defined(AFX_RESOURCE_DLL)

    C Board

    1. Registered User
      Join Date
      May 2012
      Posts
      21

      Where to include path of header files in Visual Studio

      Hello,

      I am new to Visual C++ with MS Visual Studio. I was trying to debug a program when I got the error:

      stdafx.h(15) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

      I have the MFC library and the files stdafx.h etc in my PC. So as I understand, I simply need to give the proper path in the Visual Studio. Can anyone pls, error lnk1120 afxwin.h. tell me how to do so.

      Thanks,
      Emma Good

    2. Registered User hk_mp5kpdw's Avatar
      Join Date
      Jan 2002
      Location
      Northern Virginia/Washington DC Metropolitan Area
      Posts
      3,817
      You could probably just search your computer for afxwin.h and wherever it is that's the folder, error lnk1120 afxwin.h.
      "Owners of dogs will have noticed that, error lnk1120 afxwin.h, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
      -Christopher Hitchens

    3. Registered User
      Join Date
      May 2012
      Posts
      21
      Quote Originally Posted by hk_mp5kpdwView Post
      You could probably just search your computer for afxwin.h and wherever it is that's the folder.
      I had searched the error lnk1120 afxwin.h to find the files but the C++ compiler is not able to read the same, error lnk1120 afxwin.h. I wanted to know how to include the same through the compiler (Visual Studio)

      Regards,

      Emma.

    4. C++ Witch laserlight's Avatar
      Join Date
      Oct 2003
      Location
      Singapore
      Posts
      28,411
      Then configure your project settings to include the folder as a location to search for header files. I do not remember the setting off hand, but if you poke around the configuration you should eventually find it. Note that you should specify the folder that contains afxwin.h, not the path to the file itself.
      Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
      I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and error lnk1120 afxwin.h me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
      Look up a C++ Reference and learn How To Ask Questions The Smart Way

    5. Registered User
      Join Date
      May 2012
      Posts
      21
      error lnk1120 afxwin.h, I will try that.

      Thanks,

      Emma Good, error lnk1120 afxwin.h.

    6. Registered User
      Join Date
      May error lnk1120 afxwin.h Hi,

      I was able to solve the header file problem, error lnk1120 afxwin.h. But I am getting error lnk1120 afxwin.h few LNK errors. Any ideas pls:

      ***************
      Linking.
      ChSettings.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function "public: __thiscall CChSettings::CChSettings(class Terror speedcore radio error lnk1120 afxwin.h ([email protected]@[email protected]@@@Z)
      DataLogger2.obj : error LNK2001: unresolved external symbol ___security_cookie
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol ___security_cookie
      SerialCom.obj : error LNK2001: unresolved external symbol ___security_cookie
      ChSettings.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function [email protected]@[email protected]@@@Z
      DataLogger2.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler3
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler3
      SerialCom.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler3
      ChSettings.obj : error LNK2019: unresolved external symbol @[email protected] referenced in function [email protected]@[email protected]@@@Z
      DataLogger2.obj : error LNK2001: unresolved external symbol @[email protected]
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol @[email protected]
      SerialCom.obj : error LNK2001: unresolved external symbol @[email protected]
      ChSettings.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function "public: __thiscall CChSettings::CChSettings(class CWnd *)" ([email protected]@[email protected]@@@Z)
      DataLogger2.obj : error LNK2001: unresolved external symbol __RTC_CheckEsp
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol __RTC_CheckEsp
      SerialCom.obj : error LNK2001: unresolved external symbol __RTC_CheckEsp
      ChSettings.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
      DataLogger2.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
      SerialCom.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
      ChSettings.obj : error LNK2001: unresolved external symbol __RTC_InitBase
      DataLogger2.obj : error LNK2001: unresolved external symbol __RTC_InitBase
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol __RTC_InitBase
      SerialCom.obj : error LNK2001: unresolved external symbol __RTC_InitBase
      ChSettings.obj : error LNK2019: unresolved external symbol @[email protected] referenced in function "protected: void __thiscall CChSettings::OnUpdate(void)" ([email protected]@@IAEXXZ)
      DataLogger2.obj : error LNK2001: unresolved external aniwzcsd service error @[email protected]
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol @[email protected]
      SerialCom.obj : error LNK2001: unresolved external symbol @[email protected]
      DataLogger2.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" ([email protected]@Z) referenced in function "public: virtual __thiscall CLPString::~CLPString(void)" ([email protected]@[email protected])
      DataLogger2Dlg.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" ([email protected]@Z)
      DataLogger2Dlg.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new[](unsigned int)" ([email protected]@Z) referenced in function "protected: void __thiscall CLPString::CopyFrom(char const *)" ([email protected]@@[email protected])
      .\Debug/DataLogger2.exe : fatal error LNK1120: 9 unresolved externals

      **********

      Thanks,

      Emma Good

  2. C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,411
    The library should have come with some um, library files (e.g., with a .lib extension) that you need to have linked when you build your executable program. You need to find out what those library files are, then configure your project to link them.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. Registered Error reading string to double vba
    Join Date
    May 2012
    Posts
    21
    OK. will look into it. BTW was doing some googleing., error lnk1120 afxwin.h. do u suppose I need to use bufferoverflow*.lib as well.? I am on V studio 2008 SP1.

    Thanks,
    Emma Good.

  4. Novice
    Join Date
    Jul 2009
    Posts
    568
    Disclaimer: This post shows my ignorance at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

  5. Registered User
    Join Date
    May 2012
    Posts
    21
    Well., error lnk1120 afxwin.h. I checked the directory in which I received the source code etc. But it does not have any .lib files in it, error lnk1120 afxwin.h. Any other ideas pls.

    Thanks,
    Emma Good

  6. C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,411
    Isn't there some kind of README or INSTALL.txt file that you can consult? Or maybe there is actually a pre-made Visual Studio solution file that you can experiment with.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, error lnk1120 afxwin.h, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. Novice
    Join Date
    Jul 2009
    Posts
    568
    Quote Originally Posted by emmagoodView Post
    Well. I checked the directory in which I received the source code etc. But it does not have any .lib files in it. Any other ideas pls.

    Thanks,
    Emma Good
    Show us a list of your includes.
    Disclaimer: This post shows my ignorance at the time of its making. I claim error lnk1120 afxwin.h of but not responsibility for all errors in it. Reference at your own peril.

  8. Registered User
    Join Date
    May 2012
    Posts
    21
    Quote Originally Posted by mshView Post
    Show us a list of your includes.
    List of includes.do you mean the ones which I added at tools/options/VC++ Directories.?

    Also I am getting several instances of the following error:

    *********
    C:\program files\labpacks\visual c++\include\vclobjects.h(171) : error Error lnk1120 afxwin.h 'wcstombs_s': identifier not found
    *********

    Thanks,
    Emma
    Last edited by emmagood; 05-16-2012 at 03:28 AM.

  9. Novice
    Join Date
    Jul 2009
    Posts
    568
    Quote Originally Posted by emmagoodView Post
    List of includes.do you mean the ones which I added at tools/options/VC++ Directories.?
    No, error lnk1120 afxwin.h. I mean your #include directives.
    Disclaimer: This post shows my error lnk1120 afxwin.h at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

  10. Registered User
    Join Date
    May 2012
    Posts
    21
    OK. there are several files in the program which are included in the main file. So i am just collating all the #includes from the files

    #include <afxwin.h>
    #include <afxext.h>
    #include <afxcmn.h>
    #include "resource.h"
    #include <CSLScope.h> // most probably from plotlab setup; used for plotting the graphs of data
    #include "stdafx.h"
    #include <fstream.h>
    #include <math.h>
    #include <string.h>



    Presently I am getting the error :

    c:\program files\labpacks\visual c++\include\vclobjects.h(99) : error C3861: 'wcstombs_s': identifier not found

    whereas the file vclobjects.h exists at the location.

    Thanks,
    Emma

defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
////////////////////////////////////////////////////////////////////////////
/
// Version
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS error lnk1120 afxwin.h #else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Prudential\0"
VALUE "FileDescription", "PrudForm\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "PrudForm\0"
VALUE "LegalCopyright", "Copyright © 2000\0"
VALUE "OriginalFilename", "PrudForm.api\0"
VALUE error lnk1120 afxwin.h, "PrudForm\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", error lnk1120 afxwin.h, 0x409, 1200
END
END
#endif // !_MAC
#ifdef APSTUDIO_INVOKED
////////////////////////////////////////////////////////////////////////////
/
// TEXTINCLUDE
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
////////////////////////////////////////////////////////////////////////////
/
#ifndef APSTUDIO_INVOKED
////////////////////////////////////////////////////////////////////////////
/
// Generated from the TEXTINCLUDE 3 resource.
////////////////////////////////////////////////////////////////////////////
/
#endif // not APSTUDIO_INVOKED

I dont know what weird is going on, error lnk1120 afxwin.h help

Thanks in advance,

Regards,
Vishal