MegaFuse icon indicating copy to clipboard operation
MegaFuse copied to clipboard

src/EventsHandler.cpp:43:26: error: expected initializer before ':' token

Open nephaste opened this issue 10 years ago • 11 comments

Hi i am trying to cross compil your application to use on a Thecus NAS. I already cross compiled all dependencies in my Prefix directory

also modified your Makefile as follow

http://pastebin.com/RX7LG9P5

but when i launch the make command

http://pastebin.com/PhBSKKMX

any chance you bring me a fix ?

i ll be glad to propose your application on whole Thecus NAS

thanks

Stéphane

nephaste avatar May 28 '14 12:05 nephaste

the offending line requires c++11 to be compiled. first try changing "-std=c++0x" into "-std=c++11";

If it doesn't work, replace the two lines with:

for(std::set<EventsListener * >::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (*it)->notifyEvent(er);

matteoserva avatar May 28 '14 13:05 matteoserva

thanks

The first solution bring me an error while modifying the Makefile

x86_64-unknown-linux-gnu-g++ -I inc -I /raid/data/module/MegaFuse/sys/include/cryptopp -I sdk -std=c++11 -O0 -g -fstack-protector-all -Wall -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_DEBUG -I/raid/data/module/MegaFuse/sys/include -c src/MegaFuseApp.cpp -o src/MegaFuseApp.o cc1plus: error: unrecognized command line option "-std=c++11" make: *** [src/MegaFuseApp.o] Error 1

I am not sure what you mean by

If it doesn't work, replace the two lines with:

for(std::set::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (*it)->notifyEvent(er);

is it in src/EventsHandler.cpp

nephaste avatar May 28 '14 13:05 nephaste

i put back the "-std=c++0x"

and modify in src/EventsHandler.cpp

replacing

for(EventsListener * it : listeners[e])
    it->notifyEvent(er);

by

for(std::set::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (*it)->notifyEvent(er);

still push me an error

/raid/data/module/MegaFuse/sys/include/cryptopp/misc.h: At global scope: /raid/data/module/MegaFuse/sys/include/cryptopp/misc.h:548:20: warning: 'std::string CryptoPP::StringNarrow(const wchar_t_, bool)' defined but not used x86_64-unknown-linux-gnu-g++ -I inc -I /raid/data/module/MegaFuse/sys/include/cryptopp -I sdk -std=c++0x -O0 -g -fstack-protector-all -Wall -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_DEBUG -I/raid/data/module/MegaFuse/sys/include -c src/EventsHandler.cpp -o src/EventsHandler.o src/EventsHandler.cpp: In member function 'int EventsHandler::notifyEvent(EventsHandler::event, int, std::string)': src/EventsHandler.cpp:43:10: error: 'template<class _Key, class _Compare, class Allocator> class std::__debug::set' used without template parameters src/EventsHandler.cpp:43:24: error: expected ';' before 'it' src/EventsHandler.cpp:43:51: error: 'it' was not declared in this scope make: ** [src/EventsHandler.o] Error 1

nephaste avatar May 28 '14 13:05 nephaste

sorry, github deleted part of the line.

http://pastebin.com/5uJx0LSF

matteoserva avatar May 28 '14 13:05 matteoserva

it is ok, seem to go on now, I have another problem linked with libcurl and undefined reference to openssl but it is not a problem linked to MegaFuse.

Thanks again

Stéphane

nephaste avatar May 28 '14 14:05 nephaste

Finally found the rror i had was also link to the Makefile missing some libs link added

to the LDFLAGS -lssl -liconv -lcrypto -lz

now i have a full megafuse binary :)))

here is Make File modification i did

http://pastebin.com/XaCXGvgz

nephaste avatar May 28 '14 14:05 nephaste

not sure what happen but launching the MegaFuse Binary show me an eternal

API request failed, retrying in 100 ms - Use 'retry' to retry immediately... API request failed, retrying in 200 ms - Use 'retry' to retry immediately... API request failed, retrying in 400 ms - Use 'retry' to retry immediately... API request failed, retrying in 800 ms - Use 'retry' to retry immediately... API request failed, retrying in 1600 ms - Use 'retry' to retry immediately... API request failed, retrying in 3200 ms - Use 'retry' to retry immediately... API request failed, retrying in 6400 ms - Use 'retry' to retry immediately...

did i miss something ? the conf file is well filled

nephaste avatar May 28 '14 15:05 nephaste

Sometimes the MEGA server is offline. If you still cannot connect after 1 hour, write another post here. Can you connect from your ordinary PC with the same credentials?

matteoserva avatar May 28 '14 19:05 matteoserva

still the same :(((

caricata la variabile MOUNTPOINT con il valore /raid/data/MEGA API request failed, retrying in 100 ms - Use 'retry' to retry immediately... API request failed, retrying in 200 ms - Use 'retry' to retry immediately... API request failed, retrying in 400 ms - Use 'retry' to retry immediately... API request failed, retrying in 800 ms - Use 'retry' to retry immediately... API request failed, retrying in 1600 ms - Use 'retry' to retry immediately... API request failed, retrying in 3200 ms - Use 'retry' to retry immediately... API request failed, retrying in 6400 ms - Use 'retry' to retry immediately... API request failed, retrying in 12800 ms - Use 'retry' to retry immediately...

and no problem to log within a a web browser

can it be link to a free acoount, i registered for my test ?

nephaste avatar May 28 '14 20:05 nephaste

I have a free account too. What i mean is: try megafuse on a ubuntu or debian computer or laptop, compiled with a normal gcc (not cross compiled). If it works, then i'll try to simulate the NAS to see what goes wrong

matteoserva avatar May 28 '14 21:05 matteoserva

thanks, let me know

I will also try to compile it on a PPC NAS Thecus N2310, which doesnt require Cross compilation, all is done through a chrooted environment. but i am sure it is not related to my ToolChain, neither my NAS connection...

nephaste avatar May 29 '14 07:05 nephaste