Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Error messages in VS2017
No permission to create posts
August 7, 2017
8:57 am
Avatar
Overtone
Member
Members
Forum Posts: 5
Member Since:
August 7, 2017
sp_UserOfflineSmall Offline

Hey there,

yesterday I reinstalled everything on my computer, including the 6.8 version of RackAFX and Visual Studio 2017 Community. For some reason, I get error messages when opening older projects that used to work. The error consists of Visual Studio saying that certain words are not defined, like "NULL" or UINT. I tried to solve the issue by putting #include <cmath> at the top (since NULL is part of that) and I changed every UINT to unsigned long manually, but after that I get different error messages from the functions that include those terms.

Any idea about how to fix this or what the problem is?

Thanks!

August 7, 2017
10:31 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

I will look into this. It seems that something in VS2017 changed since I added support for it, via a Service Pack or OS update. UINT and NULL should be defined with <windows.h> which is in pluginconstants.h. What OS are you using?

I should have a new RackAFX release within a week or so and I will address this. For now, the easiest thing is to use VS2015 Community which is also free.

- Will

August 7, 2017
11:15 am
Avatar
Overtone
Member
Members
Forum Posts: 5
Member Since:
August 7, 2017
sp_UserOfflineSmall Offline

Thanks, Will. I'm using Win 10 x64.

For now, I'll use VS2015, then.

August 7, 2017
3:35 pm
Avatar
Overtone
Member
Members
Forum Posts: 5
Member Since:
August 7, 2017
sp_UserOfflineSmall Offline

No errors in VS2015...

August 8, 2017
11:47 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

I've done some debug work and found the reason that this is happening; it appears to be a bug in Visual Studio 2017 regarding updating older projects to the newer platform, or creating a new project in RackAFX. It has to do with the fact that VS2015 and VS2017 include new project settings to target specific Operating Systems - this doesn't matter for our DLLs, but it does matter when the compiler tries to locate the Windows SDK files needed. When opening an older project in VS2017, you get a message to upgrade your project to the latest settings, and this includes the OS Target. The message box tells you that it is upgrading to a 10.0.xxxxx version:

Image Enlarger

However, if you click OK and then check the settings, you will see that they are not changed in your Solution Properties:

Image Enlarger

This is causing your problem because you don't have the Win8.1 SDK installed on you computer.

The way to fix this is easy but will need to be done for each project, old or new. After upgrading or creating a new project, right click on the Solution and choose "Retarget Projects" then select the 10.0.xxxxx version from the dialog. After executing this, the target OS will be properly changed. 

This is also a problem for new RackAFX projects, which contain NO information on a target OS. It turns out that the VS2017 project default is Win8.1, even if you are on Win10 and even if you don't have the SDK installed. Also, installing the Win8.1 SDK from Microsoft won't work either - it does not include the library files (all the windows .h files) you need (why, I don't know...)

This is also something that is a pain for me, because I can't simply insert the 10.0.xxxxx value into the project file, as it might change at any time they do a new OS update, or a new VS2017 update, causing the problem to happen all over again. I will report this to Microsoft and hopefully they will fix it in a future update. But at least you can now use VS2017 without all the errors by following that step.

- Will

August 8, 2017
1:08 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

NOTE: if you have VS2015 installed and you are compiling properly, then you may be self-fixed. Check to see if you have the Windows 8.1SDK installed. It will be in:

C:\Program Files (x86)\Windows Kits\8.1

Inside of that, you should have \Include\shared folder which contains the .h files that #include <windows.h> requires. Inside that folder you will find minwindef.h which defines the UINT and other Win-specific defines. If you have this folder, then you should be able to properly compile with VS2017 without errors. 

Will

August 9, 2017
10:34 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline
Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143