Ad Widget

Collapse

How to compile the windows agent?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eran
    Member
    • Apr 2007
    • 36

    #1

    How to compile the windows agent?

    I've posted a few bugs today related to the windows agent. I could probably fix them if I could compile the sources for the windows environment.
    Anyone knows how to do it?

    Thanks,
    Eran
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    We use Microsoft Visual Studio 6 and Windows SDK.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • eran
      Member
      • Apr 2007
      • 36

      #3
      Thanks Alexei.
      Do you use any special settings or just use the workspace or the make file included in the sources?
      I have VS 2005 and it's not even close to compiling. I've spent about an hour trying to get it to compile without much success, everytime I manage to fix one problem another one pops up.

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Hi,

        and for me it complains about missing files zbxwin32/perfmon.c
        and zbxwin32/service.c (Beta 1.3.5).

        Regards,

        Norbert.

        Comment

        • eran
          Member
          • Apr 2007
          • 36

          #5
          Hi Norbert,
          In order to compile the agent you need VS 6 + Windows SDK. I may get it to work with VS 2005 when I have some time, but it doesn't compile there "out of the box".
          You also need to place the 2 files in the attachment in the project directory, I had to search for them on the Internet, I have no idea why aren't they included with the distribution.

          Now rename or delete the file /config/config.h , it is a unix configuration file and it conflicts with the /build/win32/include/config.h file.

          Finally you need those 2 missing files, once again, I don't know why they are not included in the distribution, but you can find them if you check an older distribution version, I think I used 1.3.2.

          If I didn't forget anything then that's it.

          Good luck,
          Eran
          Attached Files
          Last edited by eran; 18-04-2007, 18:06.

          Comment

          • bryancan
            Junior Member
            • Sep 2006
            • 22

            #6
            Get the project complete in svn

            So cant we get the project straightened up in svn so we can compile the agent please?

            Comment

            • NOB
              Senior Member
              Zabbix Certified Specialist
              • Mar 2007
              • 469

              #7
              Hi,

              I mixed the code from zabbix 1.3.2 (perfmon.c and service.c) and
              the latest from 1.3.5 and tried to compile it with MingW (using Dev-cpp).
              After spending half a day on this another (compile-) problem with errno showed
              up, but I didn't have time to proceed further.
              I'll try to find some time during the next days for fixing this one.

              And then the hard part (linking) will come.

              No promise for any release date, of course.

              Regards,

              Norbert.

              Comment

              • bryancan
                Junior Member
                • Sep 2006
                • 22

                #8
                I've loaded VS 6 and Windows SDK and then opened the dsw file from \build\win32\project and I still have nothing but a mess trying to compile this agent. When I try and compile it gives me the errors in the attatchment file. Is there a difference between my sdk and yours?

                Comment

                • bryancan
                  Junior Member
                  • Sep 2006
                  • 22

                  #9
                  Got the solution

                  The quest is complete. After hearing back from Alexi, I put in VS 6.0 AFTER REMOVING VS 2005 (not sure if it helped, but figured it helped). Then the key is the version of Windows SDK. I had the Jan 2006 and that showered me with errors. I got the April 2005 version http://www.microsoft.com/downloads/d...displaylang=en added the include dir from the sdk in Tools>Options>Directories under Include files then the Lib from the SDK under the Library files drop down.
                  Next open the dsw workspace file from build\win32\project dir and compile the correct project configuration for you....

                  Bryancan

                  Comment

                  • Niels
                    Senior Member
                    • May 2007
                    • 239

                    #10
                    Can someone comment further on this?

                    I want to compile the windows agent -- so what do I do exactly?

                    Comment

                    • Alexei
                      Founder, CEO
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Sep 2004
                      • 5654

                      #11
                      By the way, we switched to MS Visual Studio 2005 for pre 1.4.3 and pre 1.6 development. This should simplify build of agents very much.
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • RohrbaGe
                        Senior Member
                        • Aug 2005
                        • 167

                        #12
                        Compile windows agent

                        I´m trying to compile the windows agent on
                        a VS2005 + Win2003 SDK, but are getting some error messages
                        about missing header files.

                        Fehler 1 fatal error C1083: Datei (Include) kann nicht geöffnet werden: "grp.h": No such file or directory c:\data01\download\zabbix\zabbix-1.4.6\zabbix-1.4.6\zabbix-1.4.6\include\sysinc.h 77
                        Fehler 2 error BK1506 : Datei ".\debug\cpustat.sbr" kann nicht geöffnet werden: No such file or directory BSCMAKE


                        I´m trying to add a function to check the folder size or to
                        run vbs scriptßs with parameter.

                        Has anyone an idea where to search the problem?

                        Gerald

                        Is nobody compiling the windows agent?
                        Last edited by RohrbaGe; 02-09-2008, 18:58.

                        Comment

                        • ataylo13
                          Senior Member
                          • Feb 2007
                          • 122

                          #13
                          I am trying to compile the 1.6.1 agent for Win2003 servers 64bit and 32bit.... When I tried to open the project in VS2005 it complained that 2005 was too old. I upgraded to VS2008 and the project loads correctly, and I loaded the Windows SDK for Win2003 R2.

                          When I try to build the zabbix agent this is what I get...

                          1>------ Build started: Project: zabbix_agentd, Configuration: Debug Win32 ------
                          1>Compiling messages...
                          1>mc : error : 0x2 trying to open file <and>.
                          1>Project : error PRJ0019: A tool returned an error code from "Compiling messages..."
                          1>Creating browse information file...
                          1>Microsoft Browse Information Maintenance Utility Version 9.00.21022
                          1>Copyright (C) Microsoft Corporation. All rights reserved.
                          1>BSCMAKE: error BK1506 : cannot open file '.\Debug\cpustat.sbr': No such file or directory
                          1>Build log was saved at "file://c:\Documents and Settings\ataylor1-sa\Desktop\1.6.1\zabbix-1.6.1\build\win32\project\Debug\BuildLog.htm"
                          1>zabbix_agentd - 3 error(s), 0 warning(s)
                          ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


                          Any help would be greatly appreciated.
                          Version : 1.8.8
                          Current Configuration 1 Master and 3 Child Nodes

                          Comment

                          • Tristan
                            Senior Member
                            • Feb 2008
                            • 110

                            #14
                            is there anyone out there with use full information to compile the project?
                            It looks like zabbix is written in vs 2008 with the SDK?

                            Comment

                            • Tristan
                              Senior Member
                              • Feb 2008
                              • 110

                              #15
                              part of the solution

                              install visual c++ 2008 express
                              install the windows platform sdk
                              install Windows SDK for Windows Server 2008 and .NET Framework
                              remove config.h from the include directory(zabbix-1.6.2\include)
                              open build\win32\project\zabbix.sln with visual C++ 2008

                              add the following directory to your C++ include directory's: C:\Program Files\Microsoft Platform SDK\Include\mfc


                              open the configuration manager(near the start debugging button) and change the settings to release, win32 and select all builds.
                              Start debugging

                              Done.
                              Last edited by Tristan; 27-01-2009, 00:06. Reason: FIXED

                              Comment

                              Working...