|
-
May 26th, 2001, 07:53 PM
#1
VC 6.0 Linker error when calling timeGetTime WINAPI function
I’m converting a “Tetris” game from Visual Basic 5.0 to Visual C++ 6.0. In the VB version, I used easily the “TimeGetTime” WINAPI function to get the highest resolution interval for the sprites animation. In VC++ 6.0, I tried to use the same function declaring the “mmsystem.h” header but the compiler gives me the following error code :
TetrisView.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
Debug/Tetris.exe : fatal error LNK1120: 1 unresolved externals
I didn’t think that it could be so difficult to use an WINAPI function in a Visual C++ project. If anybody had a simple answer to my problem, it would be great !
-
May 26th, 2001, 08:24 PM
#2
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
never worked with this function, but anyway try to add
winmm.lib
to your project settings in the LINK tab
Regards,
Alexander Saprykin
http://www.Saprykin.com-1.net
-
May 28th, 2001, 06:10 PM
#3
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Your solution was the good one !
When asking about this linker error message, the giant MSDN library gives so many crazy or complicated technical articles, but never tell about this simple way.
And I spent so many hours to search about.
Really thank you !
Regards,
Thierry Mentreau.
-
May 28th, 2001, 11:23 PM
#4
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Hello
Do you mind to share to code of this program, whehter in VB or VC++.?
TQ
Sooner Or Later, Everyone Does...
-
May 29th, 2001, 01:48 AM
#5
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Hi,
It was not mentioned in the posting whether the library Winmm.lib was used in your linker options switches. If not, then link with this system library and I think the linker error would be solved.
The way to include is to go the menu item: Project->Settings. Now click on the Link tab in the dialog box and fill Winmm.lib in the object/library modules.
Do save all before building again!
With regards
Karthik
-
June 2nd, 2001, 05:33 PM
#6
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Hi,
That was the good solution !
I learned development using VBA Access, VB 5.0 and reading C and C++ language books. So I’m a beginner in C++, my English is approximate and the MSDN library doesn't know simple answers.
Many, many, many thanks for your help !
With regards,
Thierry.
-
June 2nd, 2001, 06:04 PM
#7
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Sorry but my English is poor,
You ask me to distribute the source code of my program ?
If it’s that you want, it's OK for me but I’m just beginning the C++ version. So I can only give you the VB Project files (converted recently from VB 5.0 to VB 6.0).
Just tell me.
Regards,
Thierry.
-
June 4th, 2001, 03:45 AM
#8
Re: VC 6.0 Linker error when calling timeGetTime WINAPI function
Yes, please send me your program code in Visual Basic. thanks so much
Sooner Or Later, Everyone Does...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|