Hello, I’ve been having various bugs with oF- this is one that always seems to pop up.
I found this thread where there’s a very long discussion about it. @arturo marks the issue as having been fixed by ofxProjectGenerator, which I assume is what you run from openFrameworks/projectGenerator/projectGenerator.exe, which is what I’ve always used to generate my projects.
so I redownloaded openFrameworks for Windows VS 2017-2022, replaced all the files in my openFrameworks directory with the contents of the .zip, except for my apps folder and recompiled an old tutorial project that includes ofxGui but doesn’t actually use it.
I generated (Update), open it in VS2019, right-click on the Solution in the Solution Explorer and retarget it to v142
- Build settings are: Release, Win32. I press F5 and it runs with no problem.
- Rebuild as Debug, Win32. Press F5. Runs with no problem.
- I return the build settings to Release, Win32. Press F5 and I get these three errors over and over for a bunch of ofxGui objects:
|Severity|Code|Description|Project|File|Line|Suppression State|
|---|---|---|---|---|---|---|
|Error|LNK2038|mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in main.obj|004_3DShapes|C:\Users\selli\openFrameworks\apps\openFrameworksTutorialSeries\004_3DShapes\ofxBaseGui.obj|1||
|Severity|Code|Description|Project|File|Line|Suppression State|
|---|---|---|---|---|---|---|
|Error|LNK2038|mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in main.obj|004_3DShapes|C:\Users\selli\openFrameworks\apps\openFrameworksTutorialSeries\004_3DShapes\ofxBaseGui.obj|1||
|Severity|Code|Description|Project|File|Line|Suppression State|
|---|---|---|---|---|---|---|
|Error|LNK2001|unresolved external symbol __imp__invalid_parameter|004_3DShapes|C:\Users\selli\openFrameworks\apps\openFrameworksTutorialSeries\004_3DShapes\ofxBaseGui.obj|1||
I repeat steps 1)-3) for x64 and the result is the same. This only happens when I have addons in the project. If I remove ofxGui in the ProjectGenerator, I can switch between Debug and Release mode with no issue.
I think this problem has always been here and I’ve just worked around it by recompiling every time I want to switch back from Debug to Release build, but since I’m currently trying to debug some other issues with running video (which runs slower in Debug) I’d really like to be able to switch back and forth freely.
Please tell me what I’m doing wrong!