[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 733
  • Last Modified:

Unrecognized data types

I'm new to this software design business and I'm trying to compile some driver code for a Cypress USB microcontroller and I get the following errors (short version):

Compiling...
ezusbsys.c
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(48) : error C2061: syntax error : identifier 'PHYSICAL_ADDRESS'
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(48) : error C2059: syntax error : ';'
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(48) : error C2059: syntax error : ','
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(117) : error C2061: syntax error : identifier 'ULONG'
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(118) : error C2061: syntax error : identifier 'FunctionNumber'

The ceddk.h file looks like the following:

(line:43) #include <ntstatus.h>
(line:44) #ifdef _MAC
(line:45) #include <macwin32.h>
(line:46) #endif
(line:47)
(line:48) typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
(line:49)
(line:50) typedef enum _INTERFACE_TYPE {
(line:51)     InterfaceTypeUndefined = -1,
(line:52)

I did a little research and it looks like "LARGE_INTEGER" is a supported data type, but my system/compiler doesn't recognize it.  I've tried to include <Windows.h> but that didn't seem to help.  Am I missing an include file in my Visual Studio 2005 project or something???

Thanks,

-Brandon
0
microbaker
Asked:
microbaker
  • 4
  • 2
1 Solution
 
WelkinMazeCommented:
Hi,
Try to replace
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;

with

typedef LARGE_INTEGER PHYSICAL_ADDRESS;
typedef LARGE_INTEGER *PPHYSICAL_ADDRESS;
0
 
microbakerAuthor Commented:
When I did that, I got the same error...

Compiling...
ezusbsys.c
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(49) : error C2061: syntax error : identifier 'PHYSICAL_ADDRESS'
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(49) : error C2059: syntax error : ';'
c:\Cypress\USB\Drivers\ezusbdrv\ceddk.h(50) : error C2143: syntax error : missing '{' before '*'


I just commented out that line (48) and split it into two lines, as you suggested...


#include <ntstatus.h>
#ifdef _MAC
#include <macwin32.h>
#endif

//typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
typedef LARGE_INTEGER PHYSICAL_ADDRESS;
typedef LARGE_INTEGER *PPHYSICAL_ADDRESS;

typedef enum _INTERFACE_TYPE {
0
 
WelkinMazeCommented:
maybe LARGE_INTEGER isn't find really
Do you include windows.h with no capital letters?
#include <windows.h>
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
microbakerAuthor Commented:
After using all lower case letters for "windows.h" that problem seems to disappear, but now I get:

Compiling...
ezusbsys.c
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(170) : error C2061: syntax error : identifier 'WPARAM'
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(170) : error C2059: syntax error : ';'

Which I find a little weird, since that path isn't defined in my solution (at least as far as I know)...

0
 
WelkinMazeCommented:
This seems like some problem with visual studio itself. I can't say distantly what exactly is the problem. Maybe some misconfiguration in the tool you use.
0
 
WelkinMazeCommented:
you can try to search for this problem file and look at it or also see if there isn't something else that is compiled along with your project.
Also you may open a new question if the problem persist.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now