- Joined
- Oct 30, 2009
- Messages
- 14,018
- Reaction score
- 4
- Points
- 0
Is it being linked with Orbitersdk.lib? Is ORBITER_MODULE defined?Code:1>LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
ORBITER-FORUM will be temporarily closed at 2026-07-23 18:00 UTC while we complete some OF maintenance tasks. The amount of downtime is expected to take up to one hour, but probably less.
Is it being linked with Orbitersdk.lib? Is ORBITER_MODULE defined?Code:1>LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
I have no idea if or how the "__DllMainCRTStartup@12" is linked with Orbitersdk.lib. And if you mean "#define ORBITER_MODULE" being there and having no red underlines, then yes, it is defined.Is it being linked with Orbitersdk.lib? Is ORBITER_MODULE defined?
Is ORBITER_MODULE defined before you include header files?
#define STRICT
#define ORBITER_MODULE
#include "orbitersdk.h"
#include "PayloadManager.h"
//#include "OrbiterSoundSDK40.h"
#include <cstdio>
#include <cmath>
#include <string>
#include <stdio.h>
Have you changed any other project properties than the output type? If you did reset them to default (inherit from parent or project defaults).
I did that, the .dll is still 3 kb (with VS 2008), instead of ~100 kb (as it should be) when I compile it with VS 2015.Restore "Ignore All Default Libraries" to default.
Any reason you are using delay loading?
3. Define the PayloadManager.dll as a delay loaded dll. If you are using MS Visual Studio open project properties and add to Linker/Input/Delay Loaded DLLs value PayloadManager.dll.
1>LINK : warning LNK4199: /DELAYLOAD:PayloadManager.dll ignored; no imports found from PayloadManager.dll
1>LINK : warning LNK4199: /DELAYLOAD:C:\Users\user\Desktop\Orbiter\orbiter_m\Modules\PayloadManager.dll ignored; no imports found from C:\Users\user\Desktop\Orbiter\orbiter_m\Modules\PayloadManager.dll
//Scenario Editor definations
DLLCLBK void secInit (HWND hEditor, OBJHANDLE hVessel){
/* Here you can define your own Scenario Editor vessel-specific pages .........
.........
.........
*/
// Define PayloadManager Scenario Editor interface PayloadManager::DefineScenarioEditorPage(hEditor, hVessel);
}
EditorModule=[My_vessel_dll_name]
EditorModule=[My_vessel_dll_name]
(Just remember that most of the code is by BrianJ [with some parts by Kulch], modified by me.)Great work!
...I could admire meshes and textures (from what I've seen so far are pretty good), and hope for you teaming up with someone to create dll-ed version or regret if it stays as velcro/multistage.
Can "PM_SetSlotAttachmentParams" do this relocation? Because in the SDK doc, it only talks about it setting or resetting the "default" position, not the position of the current payload(s).
I don't know the payloadManager actually. So sorry if I'm making you loosing time, but I don't understand what is wrong with the picture, it seems perfect to me, and if position reference changes accordingly keeping relative distances correct it seems exactly what should happen. what is the target that you want to achieve?
for(int i= 0; i< PayloadCount; i++){
pldofs = PM_GetDistantVectorToPayload(i)
ofs = pldofs -_V(0,0,cgdif);
PM_SetSlotAttachmentParams(i,ofs,_V(0,0,1),_V(0,1,0));
}
//Payload placement compensation during staging (thank you woo482!)
int PayloadCount = PM_GetMaximumPayloadsNumber();
for (int i = 0; i < PayloadCount; i++)
{
VECTOR3 pldofs = PM_GetDistantVectorToPayload(i);
VECTOR3 ofs = pldofs - STG1STG2_OFF; //subtracts payload offset vector by stage 01/02 offset vector
PM_SetSlotAttachmentParams(i, ofs, _V(0, 0, 1), _V(0, 1, 0));
}