Page 1 of 1

Build HelloWorld.cpp plugin

Posted: Sun 27 Sep, 2015 20:39
by jonib
Hi, I'm trying to compile the HelloWorld.cpp example plugin (Haven't done any C/C++ coding for 20 years)

I got it almost (I hope) compiled but I'm getting this error:

Code: Select all

linking final.32W.gcc/HelloWorld.dll
d:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lCRT
collect2.exe: error: ld returned 1 exit status
../makefile_gcc_target_inc:35: recipe for target 'final.32W.gcc/HelloWorld.dll' failed
mingw32-make.EXE: *** [final.32W.gcc/HelloWorld.dll] Error 1
I used svn to get all the source so I should have all the sourecode.

I renamed "makefile_gcc" to "makefile" and are running "mingw32-make" when compiling.

What do I need to do to make it find CRT?

jonib

Build HelloWorld.cpp plugin

Posted: Mon 28 Sep, 2015 06:18
by DrKnS
You need to build CRT first, see plugins\common\CRT\makefile_lib_gcc

Build HelloWorld.cpp plugin

Posted: Mon 28 Sep, 2015 08:17
by jonib
DrKnS wrote: You need to build CRT first, see plugins\common\CRT\makefile_lib_gcc
First of THANKS :bojan: I got it compiled (and showing in FAR)

Damn that did cross my mind (hey should I compile CRT first) but then decided that the makefile was supposed to do all that for me. :-(

Now that I got something compiled I'll look at other plugins with source, but is there any help, guides for a non Russian to start doing plugins?

Edit: The makefile builds HelloWorld.cpp as C++, I need to build it as C how do I do that?

jonib

Build HelloWorld.cpp plugin

Posted: Mon 28 Sep, 2015 09:47
by DrKnS
Build system is not perfect, unfortunately.
I don't think there are any guides, but feel free to ask anything.
To compile it as C rename HelloWorld.cpp to HelloWorld.c and change makefile_gcc appropriately.

Build HelloWorld.cpp plugin

Posted: Mon 28 Sep, 2015 13:58
by pepak
jonib wrote:Now that I got something compiled I'll look at other plugins with source, but is there any help, guides for a non Russian to start doing plugins?
I never found any, unfortunately. What mostly worked for me, though, was searching for a plugin which worked in similar fashion to what I had in mind and stealing adapting its solution :)

Build HelloWorld.cpp plugin

Posted: Sun 04 Oct, 2015 00:47
by jonib
DrKnS wrote:I don't think there are any guides, but feel free to ask anything.
I guess I'll have to, even though its not my style. I posted a separate thread for the plugin I'm trying to make.
To compile it as C rename HelloWorld.cpp to HelloWorld.c and change makefile_gcc appropriately.
That didn't go too well, but I think I wont need to, we' ll see.

jonib