Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Gloox with Visual Studio 2010

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!

like image 561
Mark Piecis Avatar asked May 03 '26 11:05

Mark Piecis


1 Answers

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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!