Discussion:
timeGetTime
(too old to reply)
Erik
2004-10-06 08:43:55 UTC
Permalink
Hi,

I'm using VC.net making a DLL and trying to use functions in
MMSystem.h particularily timeGetTime().
I include "windows.h", "MMSystem.h" (just a precaution, it should be
enough with windows.h, right??) and add the WinMM.lib library but
still I get a compiler error (ie no linker error) saying that the
identifier cannot be found.

Another problem is that if I try to include a file that does not
exist, the compiler won't generate an error.... that should not be any
problem here though, the files above *do* exist.

Has anybody an idea what this could be?

Thanx!

/Erik
Scott McPhillips [MVP]
2004-10-06 13:06:48 UTC
Permalink
Post by Erik
Hi,
I'm using VC.net making a DLL and trying to use functions in
MMSystem.h particularily timeGetTime().
I include "windows.h", "MMSystem.h" (just a precaution, it should be
enough with windows.h, right??) and add the WinMM.lib library but
still I get a compiler error (ie no linker error) saying that the
identifier cannot be found.
Another problem is that if I try to include a file that does not
exist, the compiler won't generate an error.... that should not be any
problem here though, the files above *do* exist.
Has anybody an idea what this could be?
Thanx!
/Erik
Maybe what this could be: Examine your stdafx.h file. If it contains a
#define that is anything like LEAN_AND_MEAN delete it. This #define
hides a lot of "less frequently used" portions of windows.h to speed
compiles.
--
Scott McPhillips [VC++ MVP]
e***@yahoo.se
2004-10-07 06:08:24 UTC
Permalink
Post by Scott McPhillips [MVP]
Post by Erik
Hi,
I'm using VC.net making a DLL and trying to use functions in
MMSystem.h particularily timeGetTime().
I include "windows.h", "MMSystem.h" (just a precaution, it should be
enough with windows.h, right??) and add the WinMM.lib library but
still I get a compiler error (ie no linker error) saying that the
identifier cannot be found.
Another problem is that if I try to include a file that does not
exist, the compiler won't generate an error.... that should not be any
problem here though, the files above *do* exist.
Has anybody an idea what this could be?
Thanx!
/Erik
Maybe what this could be: Examine your stdafx.h file. If it contains a
#define that is anything like LEAN_AND_MEAN delete it. This #define
hides a lot of "less frequently used" portions of windows.h to speed
compiles.
Thanks Scott!
That might have been the reason. However, when I search for that file
in the vc install dir I come up with 35 results so I have a little
problem determining which one is used in my app ;-)
I happy now that it works for whatever reason anyway :-)

/Erik
Scott McPhillips [MVP]
2004-10-07 12:35:32 UTC
Permalink
Post by e***@yahoo.se
Post by Scott McPhillips [MVP]
Maybe what this could be: Examine your stdafx.h file. If it contains a
#define that is anything like LEAN_AND_MEAN delete it. This #define
hides a lot of "less frequently used" portions of windows.h to speed
compiles.
Thanks Scott!
That might have been the reason. However, when I search for that file
in the vc install dir I come up with 35 results so I have a little
problem determining which one is used in my app ;-)
I happy now that it works for whatever reason anyway :-)
/Erik
The stdafx.h file that your program uses is in your project directory,
not any of the VC directories.
--
Scott McPhillips [VC++ MVP]
e***@yahoo.se
2004-10-08 09:47:59 UTC
Permalink
Post by Scott McPhillips [MVP]
Post by e***@yahoo.se
Post by Scott McPhillips [MVP]
Maybe what this could be: Examine your stdafx.h file. If it contains a
#define that is anything like LEAN_AND_MEAN delete it. This #define
hides a lot of "less frequently used" portions of windows.h to speed
compiles.
Thanks Scott!
That might have been the reason. However, when I search for that file
in the vc install dir I come up with 35 results so I have a little
problem determining which one is used in my app ;-)
I happy now that it works for whatever reason anyway :-)
/Erik
The stdafx.h file that your program uses is in your project directory,
not any of the VC directories.
Actually LEAN_AND_MEAN was not defined in the stdafx file that I
used.... It instead seems that it is defined in afxv_w32.h. If I
remove it there it works!
Seems a bit odd though, to have to edit that file....

/Erik

e***@yahoo.se
2004-10-06 14:02:48 UTC
Permalink
I found the error myself, I had to recompile the precompiled headers
for some reason. Now it works!
Post by Erik
Hi,
I'm using VC.net making a DLL and trying to use functions in
MMSystem.h particularily timeGetTime().
I include "windows.h", "MMSystem.h" (just a precaution, it should be
enough with windows.h, right??) and add the WinMM.lib library but
still I get a compiler error (ie no linker error) saying that the
identifier cannot be found.
Another problem is that if I try to include a file that does not
exist, the compiler won't generate an error.... that should not be any
problem here though, the files above *do* exist.
Has anybody an idea what this could be?
Thanx!
/Erik
Continue reading on narkive:
Loading...