Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Develop a plugin

    Plugin Development
    developement plugin
    6
    13
    6807
    Loading More Posts
    • 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.
    • GFdevelop
      GFdevelop last edited by

      How to develop a plugin without Visual Studio? What are the general info to compile plugin with gcc/g++?

      1 Reply Last reply Reply Quote 0
      • dail
        dail last edited by

        I’ve never done it myself but I don’t see why it wouldn’t be possible using gcc (I’m assuming you are meaning like MinGW not native Linux compiler). I would take a look at a few resources first:

        • This wiki article (very useful but some info is outdated or not applicable) http://docs.notepad-plus-plus.org/index.php?title=Plugin_Development
        • The C++ template https://github.com/npp-plugins/plugintemplate/releases

        Even though the template is for MSVS it is a great place to start. It really comes down to getting gcc to create a DLL with the correct functions exported. I have done stuff like that in the past but can’t recall how to do it off the top of my head, but this type of info is easily Google-able.

        1 Reply Last reply Reply Quote 0
        • GFdevelop
          GFdevelop last edited by

          Ok thanks, I have see the template but the extension is .vcxproj can I have a project in extension .sln? My IDE (Codelite) read visual studio project in exension .sln but not read .vcxproj…

          The output is dynamic library it os roght?

          1 Reply Last reply Reply Quote 0
          • dail
            dail last edited by

            but the extension is .vcxproj can I have a project in extension .sln?

            MSVC can create the .sln file. Not sure if there is a way to create it without MSVC.

            The output is dynamic library it os roght?

            If I understand you correctly then yes.

            1 Reply Last reply Reply Quote 0
            • botman99
              botman99 last edited by

              You might want to try using the Microsoft Visual Studio 2013 community edition. It’s free…

              https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs

              1 Reply Last reply Reply Quote 0
              • William Newbery
                William Newbery last edited by

                I have been using Visual Studio 2015 without issue, which includes some C++ compiler and IDE improvements. https://www.visualstudio.com/downloads/

                MinGW should work as well if you really dont want to use the MS tools. You just need a standard DLL with the specified exports, nothing much of interest in the template project files. The template is just a guide/startpoint to copy, and the needed API files (plus ILexer.h if doing syntax highlighting) are on the main git repo.

                1 Reply Last reply Reply Quote 0
                • GFdevelop
                  GFdevelop last edited by

                  ok thanks, I will try to develop a plugin with gcc, are there particular arguments to pass to compiler?

                  1 Reply Last reply Reply Quote 0
                  • gstavi
                    gstavi last edited by

                    I compile my plugins with Microsoft compiler (e.g. Windows SDK) and cygwin makefiles.
                    I do have MSDEV for occasional debugging.
                    Nothing special about NPP plugins, just compile a DLL and provide the required include paths and libraries.

                    1 Reply Last reply Reply Quote 0
                    • AdrianHHH
                      AdrianHHH last edited by

                      Kasper has done some great work on making plugins with Visual Studio and C#. See https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases
                      This should work with the Community editions of Visual Studio which is free.

                      1 Reply Last reply Reply Quote 0
                      • GFdevelop
                        GFdevelop last edited by

                        Hello, I have a problem with line 53 of file GoToLineDlg.cpp error is this:

                        GoToLineDlg.cpp.o:GoToLineDlg.cpp:(.text$ZN19DockingDlgInterface4initEP11HINSTANCE__P6HWND_[ZN19DockingDlgInterface4initEP11HINSTANCE__P6HWND_]+0x57): undefined reference to `__imp_PathFindFileNameA’
                        collect2.exe: error: ld returned 1 exit status
                        Makefile:2: recipe for target ‘NppPluginDemo’ failed
                        mingw32-make: *** [NppPluginDemo] Error 1

                        Is there an alternative code to line 53?

                        1 Reply Last reply Reply Quote 0
                        • dail
                          dail last edited by

                          @GFdevelop

                          How have you been trying to compile it?

                          What have you tried so far to fix it?

                          Have you tried Google?

                          1 Reply Last reply Reply Quote 0
                          • GFdevelop
                            GFdevelop last edited by

                            I have found a way to compile the plugin template with g++, please test if work:

                            • Unicode Template 32 bit
                            • Unicode Template 64 bit
                            1 Reply Last reply Reply Quote 0
                            • GFdevelop
                              GFdevelop last edited by

                              Edit: new version without string errors, I have only tested unicode 32 bit, please test ansi 32 and 64 bit, and unicode 64 bit.

                              • download
                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright © 2014 NodeBB Forums | Contributors