Hi John, Thank you for your help! I can compile my project now but it doesn't link because the prebuilt libraries seem to use a different runtime library than my executable.
So I tried to build OpenSLP with VS2010 by myself. However I get a lot of warnings (which are treated as errors) because some constants (defines) of slp_socket.h are also defined in \Microsoft Visual Studio 10.0\VC\include\errno.h (ETIMEDOUT, ENOTCONN, ...). Have you ever tried to build OpenSLP with VS2010? Do you know a workaround for this problem? Thanks, Robert. Am 28.07.2011 18:13, schrieb John Calcote: > Hi Robert, > > You have to define LIBSLP_STATIC on the compiler command line when you link > statically to libslp on Windows. This changes the function prototype in > slp.h so that the linker looks for static symbols instead of dynamic imports > (that start with __imp__). > > John > > -----Original Message----- > From: Robert Hegner [mailto:rheg...@hsr.ch] > Sent: Thursday, July 28, 2011 10:06 AM > To: openslp-users@lists.sourceforge.net > Subject: [Openslp-users] Static linking of slpstatic.lib > > The Windows installers of OpenSLP 2.0.0 Beta 2 contain libraries for dynamic > and static linking. > > My application works fine with dynamic linking, but I'd like to link > statically to slpstatic.lib. > > However, then I get the following linking errors (VC++ 2010): > > error LNK2019: unresolved external symbol __imp__SLPClose referenced in > function _main error LNK2019: unresolved external symbol __imp__SLPReg > referenced in function _main error LNK2019: unresolved external symbol > __imp__SLPOpen referenced in function _main > > Why can't these functions be found? > > Robert. > > > ---------------------------------------------------------------------------- > -- > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Openslp-users mailing list > Openslp-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openslp-users > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Openslp-users mailing list Openslp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openslp-users