Build HelloWorld.cpp plugin

A place where plug-in developers can share their knowledge and experience.
jonib
Posts: 71
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Build HelloWorld.cpp plugin

Postby jonib » Sun 27 Sep, 2015 20:39

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

User avatar
DrKnS
Posts: 4456
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 2 times
Been thanked: 105 times
Contact:

Build HelloWorld.cpp plugin

Postby DrKnS » Mon 28 Sep, 2015 06:18

You need to build CRT first, see plugins\common\CRT\makefile_lib_gcc

jonib
Posts: 71
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Build HelloWorld.cpp plugin

Postby jonib » Mon 28 Sep, 2015 08:17

DrKnS wrote:Source of the post 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

User avatar
DrKnS
Posts: 4456
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 2 times
Been thanked: 105 times
Contact:

Build HelloWorld.cpp plugin

Postby DrKnS » Mon 28 Sep, 2015 09:47

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.

pepak
Posts: 312
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 1 time
Been thanked: 9 times

Build HelloWorld.cpp plugin

Postby pepak » Mon 28 Sep, 2015 13:58

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 :)

jonib
Posts: 71
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Build HelloWorld.cpp plugin

Postby jonib » Sun 04 Oct, 2015 00:47

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


Return to “Plug-In Developers”

Who is online

Users browsing this forum: No registered users and 1 guest