I am looking for a template engine

This forum is reserved for everything you want to talk about. It could be about programming, opinions, open source programs, development in general, or just cool stuff to share!
Post Reply
kagi3624
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Feb 26, 2020 8:13 am

I am looking for a template engine

Post by kagi3624 » Fri Feb 05, 2021 9:23 am

Hello,

I am looking for a template engine similar to freemaker in Java. It does not have to do complecated stuff. It only has to be fast. I had a look into CTPP2 and even managed to install it, but for the love of God, everything is in Russian there and I have no examples to work with. So if you know how to use CTPP2 or any other template engine, let me know pls.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4838
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: I am looking for a template engine

Post by ONEEYEMAN » Sun Feb 07, 2021 7:12 pm

Hi,
Do you have a link to Russian documentation?
Also if you Google "ctpp2 documentation" - what will you get?

Thank you.

kagi3624
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Feb 26, 2020 8:13 am

Re: I am looking for a template engine

Post by kagi3624 » Mon Feb 08, 2021 7:23 pm

Hello, Onyyman, I found a documentation here http://ctpp.havoc.ru/doc/en/ with a code exaple at the bottom and some other example here http://ctpp.havoc.ru/helloworld_cpp.html but I couldn't compile it like in the example. From the english docu I can do the first compilation to get the o file.

Code: Select all

gcc -c test_3_1.cpp -I /usr/local/include/ctpp
But the second compilation (dynamic or static) leads to an error:

Code: Select all

/usr/bin/ld: cannot find -lctpp
If someone would be so kind to help me to get this compiled this is how you can instlal it.
  • Download with wget, since direct download results in a corrupt file for some reason

    Code: Select all

    wget http://ctpp.havoc.ru/download/ctpp2-2.8.3.tar.gz
  • Open the file

    Code: Select all

    ctpp2-2.8.3/src/CTPP2FileSourceLoader.cpp
    and include

    Code: Select all

    #include <unistd.h>
    else the following won't be successful
Edit...duh...

Code: Select all

gcc HashTest.cpp -o test -I /usr/local/include/ctpp2/ -L /usr/local/lib/ -lctpp2 -lstdc++
This is how you can compile the provided example files in tpp2-2.8.3/tests....the examples in the documentation are verry outdated. Dynamic linking does not work though, don't know why.

Post Reply