From: Lorenzo N. <lor...@ii...> - 2010-06-21 15:17:31
|
I strongly suggest you use cmake to generate your project files. The advantages: - we document how to use cmake with YARP - cmake is cross platform, with no effort you will get make files for gcc if one day you decide to switch to another dev environment - even if you stick to msvc you will be able to update project files when new compilers are released - cmake is faster than visual studio wizards... Having said this, the problem you report appears to be due to a missing library, it would be enough to just add winmm.lib in the linker options. The "defaultlib 'MSVCRT' conflicts" is just a warning, you can ignore it. cheers, Lorenzo On 21-Jun-10 3:40 PM, Trachtenberg Robert D (Bob) wrote: > > I am trying to build a YARP application with Microsoft Visual Studio > 2005, but having some troubles. > > Is there a sample that describes how to configure a VS project which > uses YARP? > > > > I have built ACE and YARP on my PC, and I can run the YARP server > successfully. > > Now I am trying to build a C++ project under Visual Studio 2005. > > I specified the following "Additional Dependencies: in the > Linker>Input properties: YARP_OS.lib ACE.lib > > > > My code looks as follows. It compiles OK, but has link errors (below). > > > > #include "stdafx.h" > > #include <yarp/os/all.h> > > #include <iostream> > > > > using namespace std; > > using namespace yarp::os; > > int _tmain(int argc, _TCHAR* argv[]) > > { > > printf("Hello, world\n"); > > Network yarp; > > return 0; > > } > > > > 1>Linking... > > 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of > other libs; use /NODEFAULTLIB:library > > 1>YARP_OS.lib(Time.obj) : error LNK2019: unresolved external symbol > __imp__timeBeginPeriod@4 referenced in function "public: static void > __cdecl yarp::os::Time::turboBoost(void)" > (?turboBoost@Time@os@yarp@@SAXXZ) > > 1>YARP_OS.lib(Time.obj) : error LNK2019: unresolved external symbol > __imp__timeGetDevCaps@8 referenced in function "public: static void > __cdecl yarp::os::Time::turboBoost(void)" > (?turboBoost@Time@os@yarp@@SAXXZ) > > 1>C:\SG\YARP_TESTING\YARP_SUMMMER\Debug\YARP_SUMMMER.exe : fatal error > LNK1120: 2 unresolved externals > > > > If I set "ignore all default libraries", I get tons of 'unresolved > external symbol' errors > > How can I fix this? > > > > Bob Trachtenberg > > tra...@lg... <mailto:tra...@lg...> > > > -- Istituto Italiano di Tecnologia Lorenzo Natale, PhD lor...@ii... via Morego, 30 16163 Genova Ph: +39 010 71781400 Fax: +39 010 7170817 www.iit.it |