Problem LNK2001 unresolved external symbol _sscanf UMMU

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,046
Reaction score
1,307
Points
203
Location
Dallas, TX
Error LNK2001 unresolved external symbol _sscanf alphabuggy1 D:\orbiter100830\Orbitersdk\samples\MBATEST buggy D:\orbiter100830\Orbitersdk\samples\MBATEST buggy\UMmuSDK.lib(UMmuSDK.obj) 1

Severity Code Description Project Path File Line Suppression State
Error LNK1120 1 unresolved externals alphabuggy1 D:\orbiter100830\Modules D:\orbiter100830\Modules\alphabuggy1.dll 1

I am stumped. I am trying to recompile my MBA stuff. But for some reason this project give this error.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,808
Reaction score
325
Points
83
It's all said in the error message: You are missing the library that has the symbol _sscanf.

Newer Visual Studio (>VS 2015) do not include these legacy features anymore on default, so you have to add legacy_stdio_definitions.lib to your linker files.

You could also add: #pragma comment (lib, "legacy_stdio_definitions.lib") into one of the source files to have it added by the linker as well.

Source: https://stackoverflow.com/questions...mbol-sprintf-and-sscanf-in-visual-studio-2015
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,046
Reaction score
1,307
Points
203
Location
Dallas, TX
Thanks. But I wonder why some compile using the same Ummu sdk? Yes this is VS2019.
I did this and now it works:
Code:
#define ORBITER_MODULE
#include "orbitersdk.h"
#include "ALPHABUGGYUMMUFUEL.h"
#include "OrbiterSoundSDK40.h"
#pragma comment (lib, "legacy_stdio_definitions.lib")
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,808
Reaction score
325
Points
83
When the symbol is not needed it does not have to be linked.
 
Top