Error building plug-in.

Error building plug-in.

martim.grosner
Enthusiast Enthusiast
1,544 Views
17 Replies
Message 1 of 18

Error building plug-in.

martim.grosner
Enthusiast
Enthusiast

Hello, I'm using 3ds max sdk with visual studio, more specifically using 3ds max plugin wizard on visual studio. So far all my builds have been unsuccessful, and I've only tried the first 3ds max sdk help lesson: "The learning path: Lesson 1: Sample utility plug-in". My current problem is that when I run Local Windows Debugger to try the utility plug-in, I get a failed build, but no errors. I have no idea what might be causing this. If you know how to help, it would be much apreciated.

martimgrosner_0-1668159791536.png

martimgrosner_1-1668159826731.png

 

 

0 Likes
Accepted solutions (1)
1,545 Views
17 Replies
Replies (17)
Message 2 of 18

istan
Advisor
Advisor

Some more additional informations would be helpful.

Could you share your project with us?

The project shows, you are using VS2010 platform ?

Which wizard and SDK for which maxversion you are using?

0 Likes
Message 3 of 18

martim.grosner
Enthusiast
Enthusiast

Thanks for your time.


I'm using 3ds Max Plugin Wizard with Windows 10 SDK (10.0.17134.0 and 10.0.17763.0, the latter being the default installed), and I'm using Visual Studio 2017 version. I've tried retargetting the project to Windows 10 SDK 10.0.17134.0 but it was the same result. The 3ds Max version is 2021, and the plugin version is 2020.

0 Likes
Message 4 of 18

A012255
Enthusiast
Enthusiast

Did you see this error-log?

 

\TestingWizardVS17.zip\TestingWizardVS17\obj\x64\Hybrid\TestingWizardVS17.log

 

C:\Users\m.grosner\source\repos\TestingWizardVS17\TestingWizardVS17.vcxproj(35,3): error MSB4019: The imported project "C:\Program Files\Autodesk\3ds Max 2021 SDK\maxsdk\ProjectSettings\PropertySheets\3dsmax.general.project.settings.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

0 Likes
Message 5 of 18

istan
Advisor
Advisor

'av' - you've been faster than I. Yes - the max .prop file path seem to be bad:

<Import Project="$(MaxSDK)\ProjectSettings\PropertySheets\3dsmax.general.project.settings.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(MaxSDK)\ProjectSettings\PropertySheets\3dsmax.cpp.props" />
</ImportGroup>

 

0 Likes
Message 6 of 18

martim.grosner
Enthusiast
Enthusiast

Aha! that's great help already! Thanks.

But I still have issues, I changed the <Import> with "$(MaxSDK)" to the absolute path "C:\...\3ds Max 2020 SDK\maxsdk\...".

I don't know if this is the correct way to do it, either way, it seems in the error-log "\TestingWizardVS17.log" that the project is trying to find 3ds max 2021 sdk directory, but I have 3ds max 2020 sdk installed, and I don't know what else to change.

In the project settings, while creating it with 3ds max plugin wizard, I have 3ds max 2020 sdk as the MAXSDK path.

 

PS: Any reason why 3ds max developer help has every version of 3ds max compatible with the same year's SDK, but not for 2021?

0 Likes
Message 7 of 18

istan
Advisor
Advisor

Check the user macro value of $(MaxSDK) in: "View | Other Windows | Property Manager"

 

ad PS: https://help.autodesk.com/view/MAXDEV/2023/ENU/?guid=sdk_requirements 

0 Likes
Message 8 of 18

istan
Advisor
Advisor
  <PropertyGroup Label="Globals">
    <ProjectName>TestingWizardVS17</ProjectName>
    <ProjectGuid>{6671F0BA-6FB8-4f35-8392-0676D05113A8}</ProjectGuid>
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <MaxSDK>C:\Program Files\Autodesk\3ds Max 2021 SDK\maxsdk</MaxSDK>
    <Keyword>Qt4VS</Keyword>
    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
  </PropertyGroup>

 

$(MaxSDK) points to the Max2021 path in the project

 

0 Likes
Message 9 of 18

martim.grosner
Enthusiast
Enthusiast
I had that fixed still doesn't work. My last reply was marked as spam, which had some valuable info. I changed the macros on root.vcproj_template to 3ds Max 2020 SDK.
0 Likes
Message 10 of 18

istan
Advisor
Advisor

so is it fixed?

0 Likes
Message 11 of 18

martim.grosner
Enthusiast
Enthusiast

Unfortunately, no. Like I said, I changed the root.vcproject_template, and for every $(MaxSDK) macro I put the fixed directory (max2020SDK), but the error-log keeps up the same message about max 2021 sdk.

0 Likes
Message 12 of 18

martim.grosner
Enthusiast
Enthusiast

Update: I solved the error MSB4019, I was changing root.vcxproj_template all along, and afaik that should do it because it's a template, but it didn't. So I opened the TestingWizardVS2017.vcxproj with notepad and changed the <Import> there, and I no longer get this error. But my build still gets an error. Should I accept this solution and make another post about it? Or should I keep it on this one?

0 Likes
Message 13 of 18

istan
Advisor
Advisor

Since your build error still fits to the topic, post the error in this thread.

0 Likes
Message 14 of 18

martim.grosner
Enthusiast
Enthusiast

Sorry for the late response, had a lot to do over the weekend.

Here is the new error-log. This error witht the QObject and ui_plugin has come and has gone, but is currently a thing. After I fixed the MaxSDK directory problem, I only got this one about the "cmd.exe" exited with code 3.

0 Likes
Message 15 of 18

istan
Advisor
Advisor

You miss the QT tools and probably also the QT installation.

Was there not an option in the wizard to disable the use of QT dialogs?

I mostly build my plugins with simple windows dialogs, without the need of QT. Also most of the maxsdk samples use no QT dialogs.

0 Likes
Message 16 of 18

martim.grosner
Enthusiast
Enthusiast

There is a box that I can uncheck. It says "Use Qt UI". Do I need it if I'm planing on developing a plugin (more complex than dialog windows)?

 

When trying to build a project with no Qt, I get this error: RC1015 cannot open include file 'afxres.h'
Do you have any idea what that might be?

0 Likes
Message 17 of 18

istan
Advisor
Advisor
Accepted solution

The "#include afxres.h" is for MFC. Replace it with "#include <windows.h>". I think, the wizard needs some updates.

If you want to create nice sizeable/dynamic dialogs with more complex controls, I'd rather suggest using QT, esp. if you already know QT. Unfortunately the documentation about using C++ QT in 3dsmax goes not very deep for beginners.

0 Likes
Message 18 of 18

martim.grosner
Enthusiast
Enthusiast

Yes!! I did as you said and one error afterwards "RC2104" something in the lines of: IDC_Static could not be found or is not defined. So for anyone out there who runs into the same issues that I did: do as @istan said and change "#include "afxres.h"" to "#include <windows.h>" and then on the rsource.h file under Header Files, add the line "#define IDC_STATIC -1" under the other define classes. I gave it a go and it runs with no errors. Not sure if I will get any errors in the future, but for now I can build a plugin. Thank you so much @istan for your time and pacience.

0 Likes