Author Topic: Help with OP2Helper  (Read 3089 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3237
Help with OP2Helper
« on: April 05, 2019, 09:59:03 PM »
I've spent the better part of the day trying to figure out how to convert one of my missions made with the SDK from 2005 over to use the "new" SDK.  I've hit some trouble with the OP2Helper library, though.  I have it set to build Release, but it keeps building as Debug.  Weird, but I can work with it.  Unfortunately, when I go to compile my mission, I get an unresolved external error on the CreateTubeOrWall function.  The function is definitely there, in OP2Helper.cpp, so... not sure what to do about it.  Has anyone else run into either of these problems?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Re: Help with OP2Helper
« Reply #1 on: April 06, 2019, 06:21:03 AM »
Huh, fascinating. Thanks for the report.

Probably something to do with this section of the solution file:
Code: [Select]
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0B520C87-4CFD-4A4D-ABD4-F87D26DF9AAD}.Debug|Win32.ActiveCfg = Debug|Win32
{0B520C87-4CFD-4A4D-ABD4-F87D26DF9AAD}.Debug|Win32.Build.0 = Debug|Win32
{0B520C87-4CFD-4A4D-ABD4-F87D26DF9AAD}.Release|Win32.ActiveCfg = Debug|Win32
{0B520C87-4CFD-4A4D-ABD4-F87D26DF9AAD}.Release|Win32.Build.0 = Debug|Win32
{B3F40368-F3CC-4EC5-A758-F5DAD08FEDDC}.Debug|Win32.ActiveCfg = Debug|Win32
{B3F40368-F3CC-4EC5-A758-F5DAD08FEDDC}.Debug|Win32.Build.0 = Debug|Win32
{B3F40368-F3CC-4EC5-A758-F5DAD08FEDDC}.Release|Win32.ActiveCfg = Debug|Win32
{B3F40368-F3CC-4EC5-A758-F5DAD08FEDDC}.Release|Win32.Build.0 = Debug|Win32
EndGlobalSection

The Release = Debug lines are mighty suspicious.



I don't see any obvious connection between the above issue and the CreateTubeOrWall function. I suppose we'll just have to fix the above and see what happens there.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3237
Re: Help with OP2Helper
« Reply #2 on: April 06, 2019, 10:36:16 AM »
The missing function was actually an error on my end; I had forgotten to include the OP2Helper library under the Linker settings.  Oops!
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1013
Re: Help with OP2Helper
« Reply #3 on: April 06, 2019, 10:06:32 PM »
Sirbomber,

OP2Helper compiling in debug configuration when release is selected was a bug I introduced. Thanks to you and Hooman pointing it out. Hooman merged the fix into OP2Helper's master today and I pushed this into a branch of OP2MissionSDK.

If you compile against this PR of OP2MissionSDK, it should fix the debug/release issue you were seeing: https://github.com/OutpostUniverse/OP2MissionSDK/pull/3

-Brett

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4954
Re: Help with OP2Helper
« Reply #4 on: April 10, 2019, 10:27:36 AM »
Ahh, missing include. Ok, sounds like everything is accounted for now.

@Brett, I think that PR can be merged now. Thanks for the update.