2

I am trying to use the gloox library (C++) to create a Windows XMPP application. It seems simple enough, except I don't know how to import gloox into Visual Studio 2010 so I can include it in my application project.

I've looked at the instructions provided in the read-me (shown below), but when I try to compile the library, I get this error:

Cannot open source file: 'src\tlsgnutlsserver.cpp': No such file or directory

Instructions provided in the read-me file:

Building gloox on MSVC++

  • use the included project file or create your own
  • adjust include + library paths if necessary
  • to receive any debug output you should use the LogSink facilities (this is not win32-specific)
  • build

Does anyone have experience using Gloox with VS10? If yes, can you please help me out? Thanks!

Mark Piecis
  • 103
  • 1
  • 5

1 Answers1

2

I assume you're using the official 1.0 tarball? I had the same problem (missing source file) and had to acquire the source from SVN instead. I used the 1.0 branch.

I encountered a few other build problems, namely

  • the release build configuration was set to build an Application (.exe) instead of Dynamic library (.dll) (Project->Properties->General->Configuration Type)
  • I needed to add DLL_EXPORT to the preprocessor definitions (Project->Properties->Configuration Properties->C/C++ ->Properties->Preprocessor)
  • src\atomicrefcount.cpp needed to be added to the project's source files. (Project->Add Existing Item)

This worked for me in express editions of both VC++ 2010 and VC++ 2008.

Hopefully it helps you as well.

Tushar
  • 8,019
  • 31
  • 38
Ben Brian
  • 220
  • 3
  • 6
  • Thanks a lot Ben. This helped me significantly, so I've made some small changes to make it even simpler for others. – Tushar Jul 21 '12 at 21:12
  • @TusharDhoot No problem, I should have mentioned that I later reported the problem upstream with a patch: http://bugs.camaya.net/horde3/whups/ticket/?id=197 I'm not sure how active gloox development is lately but it couldn't hurt :) – Ben Brian Jul 23 '12 at 00:46