FVWM modules and C++

All:

I have written a new module that I want to use, but I must compile it under C++… any ideas on how to do this?

I have tried editing, by hand, the Makefile generated from Makefile.am, but when I replace gcc with g++, the -L linking doesn’t work anymore, so I can’t see anyting int he fvwmlib.

I tried backtracking from the Makefile.am within my moduels directory, but got thoroughly lost trying to do.

The best that I can think of is the following:

Option A:
don’t depend on autogeneration for my module, do it all by hand for my module. (this is my least favorite option, and probably is more pain than it is worth).

Option B:
Find someone on the forum who has done something similar and ask them how/what they did to be able to compile and use a module in C++…

So, any ideas out there?

thanks,
Skender

[color=red]Edited by theBlackDragon:

  • moved from Installation to Other Languages[/color]

Thanks to thomas_adam for all his help on learning the following information:

Ok, I have figured this out. If you want to write a module that is in a different language than just plain C, the best thing to do (I have found) is install the FVWM src local on your system, then write your own Makefile - the automake is tricky for C++, and a handwritten one is sufficient. You’ll need to include the lib/ in the src tree in your make. Then, to make your module work with the rest of FVWM, just extern out the libraries that need to be used in both your module and the rest of FVWM. I found that if I extern like so:

extern "C" { #include "libs/fvwmlib.h" #include "libs/Module.h" #include "libs/Strings.h" }

that, after that, my module will communicate correctly via the Pipes with FVWM.

If anyone has any questions on writing their own modules, I will gladly discuss with them what I can :slight_smile: