- Messages
- 9
After working with the samples from the Prepar3d SDK, I wanted to stand up a new gauge project but have been unable to build even the smallest conceivable project.
Presently I am using Visual Studio 2022, the Prepar3d SDK V5, and created one simple C++ file containing this:
#include "Header.h"
#include "gauges.h"
#define GAUGE_W 100
// Define a minimal gauge callback that does nothing
void FSAPI MinimalGaugeCallback(PGAUGEHDR pgauge, SINT32 service_id, UINT_PTR extra_data)
{
}
// Set up the minimal gauge header
GAUGE_HEADER_FS700(GAUGE_W, "Minimal Gauge", NULL, NULL, MinimalGaugeCallback, 0, 0, 0);
and the Headers.h header file containing this:
#pragma once
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_BUILD 0
// magic to get the preprocessor to do what we want
#define lita(arg) #arg
#define xlita(arg) lita(arg)
#define cat3(w,x,z) w##.##x##.##z##\000
#define xcat3(w,x,z) cat3(w,x,z)
#define VERSION_STRING xlita(xcat3(VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD))
At this point I am getting a: LNK1104 cannot open file 'gauges.lib'
Again, what I am trying to achieve is to build an empty (or as empty as possible) gauge dll, with the minimum required code as opposed to reusing the sdk samples.
Any help or guidance is much appreciated.
Presently I am using Visual Studio 2022, the Prepar3d SDK V5, and created one simple C++ file containing this:
#include "Header.h"
#include "gauges.h"
#define GAUGE_W 100
// Define a minimal gauge callback that does nothing
void FSAPI MinimalGaugeCallback(PGAUGEHDR pgauge, SINT32 service_id, UINT_PTR extra_data)
{
}
// Set up the minimal gauge header
GAUGE_HEADER_FS700(GAUGE_W, "Minimal Gauge", NULL, NULL, MinimalGaugeCallback, 0, 0, 0);
and the Headers.h header file containing this:
#pragma once
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_BUILD 0
// magic to get the preprocessor to do what we want
#define lita(arg) #arg
#define xlita(arg) lita(arg)
#define cat3(w,x,z) w##.##x##.##z##\000
#define xcat3(w,x,z) cat3(w,x,z)
#define VERSION_STRING xlita(xcat3(VERSION_MAJOR,VERSION_MINOR,VERSION_BUILD))
At this point I am getting a: LNK1104 cannot open file 'gauges.lib'
Again, what I am trying to achieve is to build an empty (or as empty as possible) gauge dll, with the minimum required code as opposed to reusing the sdk samples.
Any help or guidance is much appreciated.