Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Development
  3. Compilation Error - Windows Environment

Compilation Error - Windows Environment

Scheduled Pinned Locked Moved Development
windows
5 Posts 2 Posters 60.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ?
    ?
    shobha
    wrote on last edited by
    #1

    Hi all,
      Am trying to compile Netxms-0.2.22 on window environment using VC2005 professional edition.

    I am facing the following errors and warnings during Linking process...

    Linking...
    .\Debug\graph.obj : warning LNK4042: object specified more than once; extras ignored
    main1.obj : warning LNK4006: _DllMain@12 already defined in main.obj; second definition ignored
    .\Debug\MainFrm.obj : warning LNK4042: object specified more than once; extras ignored
    nxevent.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxget.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxhttpd.obj : warning LNK4006: "char const * * g_szStatusText" (?g_szStatusText@@3PAPBDA) already defined in events.obj; second definition ignored
    nxhttpd.obj : warning LNK4006: "char const * * g_szStatusTextSmall" (?g_szStatusTextSmall@@3PAPBDA) already defined in events.obj; second definition ignored
    nxhttpd.obj : warning LNK4006: "void __cdecl Main(void)" (?Main@@YAXXZ) already defined in nxagentd.obj; second definition ignored
    nxhttpd.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxlexer.obj : warning LNK4006: _DllMain@12 already defined in main.obj; second definition ignored
    nxmc.obj : warning LNK4006: "void * g_hSession" (?g_hSession@@3PAXA) already defined in globals.obj; second definition ignored
    nxmc.obj : warning LNK4006: _WinMain@16 already defined in nxcstart.obj; second definition ignored
    nxmibc.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxpush.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxscript.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxsms.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxsnmpget.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxsnmpset.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxsnmpwalk.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    nxupload.obj : warning LNK4006: _main already defined in nxdbmgr.obj; second definition ignored
    parser.tab1.obj : warning LNK4006: "int yydebug" (?yydebug@@3HA) already defined in nxmp_parser.tab.obj; second definition ignored
    ping.obj : warning LNK4006: _NxSubAgentRegister already defined in logscan.obj; second definition ignored
    ping.obj : warning LNK4006: _DllMain@12 already defined in main.obj; second definition ignored

    Creating library Debug\netxms-2.20.lib and object Debug\netxms-2.20.exp
    CVTRES : fatal error CVT1100: duplicate resource.  type:ICON, name:1, language:0x0409
    LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

    Am not sure what the problem is and it would be rely helpful if someone tells me how to solve.

    Thanks,
    Shobha

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Looks like you mix files from different projects into one and trying to compile them as one executable. How do you create VC2005 workspace - by hand or by converting existing VC6 workspace?

      Best regards,
      Victor

      1 Reply Last reply
      0
      • ?
        ?
        shobha
        wrote on last edited by
        #3

        Hi victor,
                    I have excluded all the subagents other than ping, and portchecking during compilation.

        During compilation i am not trying to port the VC6 workspace to VS2005 workspace.

        I am just compiling the whole project modules altogether to bring it as a single executable.I am doing

        the work as an windows project in VC++2005.I am in need of your help and suggestions to overcome

        the linker errors.Thanks in advance.

        Regards,

        Shobha.

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          Hi!

          I highly recommend you to try to convert existing VC6 projects (as far as I know, Visual Studio 2005 has built-in conversion functionality for VC6 projects). Currently, there are 59 separate projects in VC6 workspace, each compiling in separate executable or DLL. They are not intended to be compiled into a single executable. The only exception is that it is possible to build monolithic agent with all subagents compiled into it, like static agent on UNIX platforms, but it will require some additional efforts.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • ?
            ?
            shobha
            wrote on last edited by
            #5

            Thanks for your reply  victor, that was very helpful...
            Am trying to compile Netxms project using VC6 Express Edition.

            And these are the errors am facing....

            netxms-0.2.22\src\console\nxuilib\inplaceedit.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            netxms-0.2.22\src\console\nxuilib\inplacecombo.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

            netxms-0.2.22\src\console\win32\nxcon.h(16) : fatal error C1189: #error :  Building NetXMS console without UNICODE support is deprecated

            Compiling netxms-0.2.22\src\libnxsl\parser.y
            Compiling netxms-0.2.22\src\libnxsl\parser.l
            ------ Build started: Project: libnxsrv, Configuration: Debug Win32 ------
            Running Message Compiler on netxms-0.2.22\src\server\libnxsrv\messages.mc
            flex: unknown flag '-'.  For usage, try
             flex --help
            Project : error PRJ0019: A tool returned an error code from "Compiling  netxms-0.2.22\src\libnxsl\parser.l"

            same error is in "netxms-0.2.22\src\server\core\nxmp_parser.l" file

            The most important error is "error LNK2019: unresolved external symbol "  - 1758 errors

            8>  Creating library .\Debug/libnxmc.lib and object .\Debug/libnxmc.exp
            8>wxPieCtrl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ) referenced in function "public: void * __thiscall wxString::`vector deleting destructor'(unsigned int)" (??_EwxString@@QAEPAXI@Z)
            8>tools.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>userSelectionDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>view.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>viewtracker.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>image.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>nxview.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>objseldlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>alarms.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)
            8>events.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ)

            I have no idea about these errors and it would be rely nice if someone helps me....

            Thanks,
            Shobha

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups