Pierre Schmitz schrieb:
The only problem is that both programs segfault on exit. I am a real noob on C++; so I am in need of a little help here. Everything works fine and my very limited skills show me that the problem occours after the main() method was left.
The bt::TorrentCreator class uses some ressources that are local in the main procedure - if those are already destroyed when the destructor is called, that might cause the segfault. Try to replace bt::TorrentCreator tc(target, trackers, webseeds, chunk_size, name, comment, priv, decentralized); with bt::TorrentCreator *tc = new bt::TorrentCreator(target, trackers, webseeds, chunk_size, name, comment, priv, decentralized); Then replace every occurrence of tc.foo with tc->foo and add delete tc; before the every return command. If I am right, the segfault should be gone. Another problem: The ktorrent torrent libraries are linked against all kinds of stuff which is not needed - probably because KDE is not compiled with -Wl,--as-needed.