News:

We really need your input in this questionnaire

Main Menu

Compilation Error - Windows Environment

Started by shobha, November 26, 2008, 01:47:39 PM

Previous topic - Next topic

shobha

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

Victor Kirhenshtein

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

shobha

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.



Victor Kirhenshtein

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

shobha

#4
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