x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

MIDIDeviceController.h causes compiler errors

The file MIDIDeviceController.h, (from the MIDIDevice plugin) when included, results in a compiler error:

 CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80) : error C2143: syntax error: missing ';' before '*'C:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80): error C2143: syntax error: missing ';'
  before '*'
 CompilerResultsLog: Info 
 CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-intC:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80)
 : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 CompilerResultsLog: Info 
 CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80) : error C2238: unexpected token(s) preceding ';'C:\Program Files\Epic Games\4.14\Engine\Plugins\Runtime\MIDIDevice\Source\MIDIDevice\Public\MIDIDeviceController.h(80): error C2238: unexpected token(s) precedin
 g ';'

The source file is totally unmodified - this happens out of the box. This makes working with MIDI devices in C++ impossible, as the MIDIDeviceController is used to interface with the devices.

EDIT: Some extra information that may or may not help:

I've added "MIDIDevice" to my PublicDependencyModuleNames line in my Build.cs, in the same way you add any plugin. I'm able to import MIDIDeviceManager.h without error with that added.

With further digging around, the particular line that has an error is PortMidiStream* PMMIDIInputStream; - the error is that PortMidiStream is not specified. I assume this specification is done in the portmidi.h file, which is included in the MIDIDevice plugin's pre-compiled header. IntelliSense is giving me the red-squiggle, saying that it cannot open that header file.

I assumed that maybe I had to do something extra to make sure this third-party dependency worked. I've tried using methods described in these AnswerHub threads, but to no avail.

Product Version: UE 4.14
Tags:
more ▼

asked Dec 15 '16 at 11:30 PM in Bug Reports

avatar image

Kowbell
150 17 26 38

avatar image Matthew J Dec 19 '16 at 07:35 PM

Hello Kowbell,

Have you tried doing this inside of a fresh project? I created a new C++ project based off the Third Person Template, enabled the MIDIDeviceController plugin, added a C++ class based off of actor, and then included the MIDIDeviceController.h using the following include statement and it compiled without any errors for me.

 #include "Engine/Plugins/Runtime/MIDIDevice/Source/MIDIDevice/Public/MIDIDeviceController.h"

Please give this a try and let me know if you receive any errors.

avatar image Kowbell Dec 20 '16 at 01:59 AM

I tried that include on my project, but got a compile error claiming there was no such file or directory. I tried on a new Third Person C++ project, and got the same error.

Right now I'm importing the header by adding "MIDIDevice" to the PublicDependencyModuleNames line in my Build.cs file, which allows me to include MIDIDeviceManager.h without error, as well as include MIDIDeviceController.h with the bug given above - the compiler does find the file, just with an error. This works both on my current project as well as the default Third Person C++ project.

I'll try re-installing 4.14.1 and see if anything changes.

Update: Re-installed 4.14.1, and both errors persist, even on another newly created Third Person C++ project.

avatar image Matthew J Dec 20 '16 at 09:52 PM

Ah, I'm seeing the issue now after including the module. I also can't get it to include that file again without including the module. Not quite sure how it was working previously. I do see that MIDIDeviceController.cpp does have a couple of "int"s in it but those aren't exposed to blueprints so they should be fine. I'm going to look into this further and get back to you.

avatar image Kowbell Dec 20 '16 at 10:01 PM

Excellent! Thank you, I look forward to hearing back :)

avatar image Matthew J Dec 23 '16 at 07:03 PM

After looking at the source code and the commit messages of when this plugin was added to the engine, it may be that this plugin is only meant to be implemented in Blueprint at the moment. I'm going to ask to person who created it to be sure but I won't be able to contact them until after the holiday break. I'll have an update for you shortly into the new year.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello Kowbell,

I spoke with the person who created this plugin and they mentioned that while it isn't intended to only be used in Blueprints, that's all it was tested for and it was never tested in an external module. Due to this, I've placed a bug report in for the issue. You can find that bug here: UE-40704

Thank you for reporting this issue and have a nice day!

more ▼

answered Jan 16 '17 at 09:56 PM

avatar image Kowbell Jan 20 '17 at 10:09 PM

Thanks for the help!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question