I send my Makefile :

all: myapp

test: all
     ${TNTNET} tntnet.xml

myapp: main.o MyApp.o
     ${CXX} -o $@ $^ ${LDFLAGS}

.SUFFIXES: .ecpp .gif .jpg .css .js .cpp
ECPPC=/opt/tntnet/bin/ecppc
TNTNET=/opt/tntnet/bin/tntnet
#CXXFLAGS+=-I/opt/tntnet/include -fPIC -O2
CXXFLAGS+=-I/opt/tntnet/include -fPIC -O2
#LDFLAGS+=-shared -L/opt/tntnet/lib -ltntnet -lcxxtools
LDFLAGS+=-L/opt/tntnet/lib -ltntnet -lcxxtools

.ecpp.cpp:
     ${ECPPC} ${ECPPFLAGS} ${ECPPFLAGS_CPP} -o $@ $<
.gif.cpp:
     ${ECPPC} ${ECPPFLAGS} -m image/gif ${ECPPFLAGS_GIF} -b -o $@ $<
.jpg.cpp:
     ${ECPPC} ${ECPPFLAGS} -m image/jpg ${ECPPFLAGS_JPG} -b -o $@ $<
.png.cpp:
     ${ECPPC} ${ECPPFLAGS} -m image/png ${ECPPFLAGS_PNG} -b -o $@ $<
.ico.cpp:
     ${ECPPC} ${ECPPFLAGS} -m image/x-icon ${ECPPFLAGS_ICO} -b -o $@ $<
.css.cpp:
     ${ECPPC} ${ECPPFLAGS} -m text/css ${ECPPFLAGS_CSS} -b -o $@ $<
.js.cpp:
     ${ECPPC} ${ECPPFLAGS} -m application/javascript ${ECPPFLAGS_JS} -b 
-o $@ $<

I don't forget my MyApp component.


Jean-Michel

Le 26/08/2014 14:19, Jouven a écrit :
> Hi,
>
> I'm assuming you have used the "tntnet-config --project MyApp" as a 
> "template" to create your standalone application version of it. I 
> think the problem is that you missed to add the component part, the 
> ecpp file, you can just "ecppc" the MyApp.ecpp to get a MyApp.cpp and 
> add it to your project.
>
> Joan Escalas
> On 26/08/2014 13:44, Jean-Michel Caricand wrote:
>> Hello,
>>
>> I created a standalone application :
>>
>> tntnet-config --project MyApp
>>
>> In my main.cpp, I have :
>>
>> #include <tnt/tntnet.h>
>> #include <cxxtools/log.h>
>> #include <cxxtools/xml/xmldeserializer.h>
>>
>> log_define("main");
>>
>> int main(int argc, char* argv[])
>> {
>>     try {
>>       log_init();
>>
>>       tnt::Tntnet app;
>>       tnt::TntConfig config;
>>
>>       std::ifstream conf("tntnet.xml");
>>
>>       cxxtools::xml::XmlDeserializer deserializer(conf);
>>       deserializer.deserialize(config);
>>
>>       app.init(config);
>>
>>       app.run();
>>     }
>>     catch (const std::exception& e) {
>>       std::cerr << e.what() << std::endl;
>>     }
>> }
>>
>> I run my app :
>>
>> ./myapp
>>
>> When I try to access to my app, I get this error :
>>
>> Error
>>
>> Not Found: vhost: localhost:8000 /
>>
>> Any idea ?
>>
>> Thank,
>>
>> Jean-Marc
>>
>> ------------------------------------------------------------------------------
>>  
>>
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> _______________________________________________
>> Tntnet-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tntnet-general
>


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to