| | | Forum Newbie
       
Group: Forum Members Last Login: 4/25/2010 8:29:06 PM Posts: 8, Visits: 22 |
| | hello: i have download Iwear sdk. and i study with "HelloTracker2". but when i run it in vc++ 2005, I get error about cant convert to vc2005. I try build a new project use vc2005 and use code file form "HelloTracker2" . i get some error i can finger out. libcmtd.lib(wwincrt0.obj) : error LNK2019: unresolved external symbol _wWinMain@16 referenced in function ___tmainCRTStartup 1>C:\work\orgeTutorial\vr920\Debug\vr920.exe : fatal error LNK1120: 1 unresolved externals so what can i do. is "HelloTracker2" can run in vc2005. Do i need to change something. by the way, is the right place i ask about this question. |
| | | | 
Supreme Being
       
Group: Forum Members Last Login: Today @ 8:14:19 AM Posts: 282, Visits: 2,482 |
| Hi, you probably opened wrong project file for "Hello tracker 2"
Open "HelloTracker2.sln" in your Visual Studio 2005, set compile to "release" (or debug doesn't matter) and just compile it, should run fine.
I'm using Visual Studio 2005 too, and this app compiled perfectly.
You got linker errors in your own project, because you, probably, not added lib files in your C++ directories. To do so, go to Tools->Options->Project and solutions->VC++ Directories, then select "Library files", and add in the list - directory to your "IWEARSDK\lib"
You will also need to add to "Include files" list - your directory to "IWEARSDK\inc"
That's probably all, should compile fine now. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 4/25/2010 8:29:06 PM Posts: 8, Visits: 22 |
| | thank you for replay me! When i open hellotracker2.sln, it is start with conversion wizard. Now, i take out all the code file and create a new MFC project, that is worked, and i have some question. m_hIwear = LoadLibrary(_T( "IWEARDRV.DLL"));if (m_hIwear) {IWROpenTracker = (PIWROPENTRACKER)GetProcAddress(m_hIwear, ( "IWROpenTracker"));IWRCloseTracker = (PIWRCLOSETRACKER)GetProcAddress(m_hIwear, ( "IWRCloseTracker"));IWRZeroSet = (PIWRZEROSET)GetProcAddress(m_hIwear, ( "IWRZeroSet"));IWRGetTracking = (PIWRGETTRACKING)GetProcAddress(m_hIwear, ( "IWRGetTracking"));IWRSetFilterState = (PIWRSETFILTERSTATE)GetProcAddress(m_hIwear, ( "IWRSetFilterState"));RestartPoll(); } i take out "_T" from each line. if there has "_T", will complier error. what is _T main. i have put this part code into my project and it looking for "PIWROPENTRACKER" , i know this pointer is declared in iweardrv.h, and i have include iweardrv.h. Do i miss anything. thank you in advance. |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 11/30/2009 5:33:01 PM Posts: 9, Visits: 30 |
| I have no idea what i'm doing, but I found that if you add the line "#define IWEARDRV_EXPLICIT" to your file it will recognise PIWROPENTRACKER and compile.
Also, replace _T with TEXT. Works for me using mingw gcc.
Hope it helps!
|
| |
|
|