Build HelloWorld.cpp plugin

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

Build HelloWorld.cpp plugin

Post 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
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Build HelloWorld.cpp plugin

Post by DrKnS »

You need to build CRT first, see plugins\common\CRT\makefile_lib_gcc
jonib
Posts: 73
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Build HelloWorld.cpp plugin

Post 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
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Build HelloWorld.cpp plugin

Post 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.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Build HelloWorld.cpp plugin

Post 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 :)
jonib
Posts: 73
Joined: Wed 16 Apr, 2008 19:55
Has thanked: 1 time

Build HelloWorld.cpp plugin

Post 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
Post Reply

Return to “Plug-In Developers”