- 0
[C++][MSVC] Cannot resolve this Linker error LNK2019, DirectX related
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By George P · Posted
Do you have a 365 account? I should have been more clear, I mean free accounts. -
By thartist · Posted
What?! "May 31 2024 knowledge cutoff"? -
-
By Aditya Tiwari · Posted
Amazon Alexa+ now has more than a million users by Aditya Tiwari Amazon's muscled-up voice assistant, Alexa+, has reached a new milestone. A company spokesperson told The Verge that Alexa+ has now crossed one million users. The e-commerce giant introduced Alexa+ earlier this year as its generative AI offering. Why? It's a new trend, and everyone is doing it. According to the company, Alexa Plus offers more natural and free-flowing conversations than its predecessor. You can speak half-formed thoughts using colloquial expressions, and the AI assistant should be able to understand you and provide an answer. Announcing its capabilities, Amazon previously said that you will be able to start a conversation on your Echo device and continue it on your phone, car, or computer. One million may not be a significant number when comparing it with the number of Alexa-enabled devices out there. Amazon revealed earlier this year that there are over 600 million Alexa devices globally. However, the number of Alexa+ users has increased from 'hundreds of thousands' in the previous month. The user base is not as big as that of other names like Gemini and ChatGPT because Amazon is still offering the generative AI assistant through an Early Access program, available to Prime and non-Prime members who own a compatible Echo device. We can find social media posts from different users who have been invited to try Alexa+. While there have been positive reviews from some, the road isn't buttery smooth for others. One user claimed that the early access Alexa+ has problems accessing some temperature sensors the previous version of Alexa would. "I also really dislike how it confidently will tell me something that is incorrect now instead of just saying it doesn't know like it used to tell me," the user added. The upgraded AI voice assistant will cost $19.99 per month, but is being offered for free to Prime subscribers. Alexa+ started rolling out in the US as part of its early access program. One reason why Amazon is giving Alexa+ a slow rollout is that the new devices and services chief, Panos Panay, wants to eliminate all the problems related to the generative AI assistant. Amazon's spokesperson told the publication that the early access program doesn't include features like brainstorming gift ideas, scheduling your next spa visit, ordering groceries hands-free, and jumping to your favorite scene on Fire TV. The program also doesn't offer the "new browser-based experience at Alexa.com," which would put Amazon's AI assistant in line with ChatGPT and Gemini. These missing features will be added in the coming weeks and months, as per the spokesperson, adding that almost 90% of the features are now a part of early access. -
By zikalify · Posted
MSI's 32-inch 4K QD-OLED gaming monitor gets a big price cut for UK gamers and professionals by Paul Hill If you’re a gamer in the UK and looking for a monitor to upgrade to then check out the MSI MPG 321URX QD-OLED 31.5 Inch 4K UHD Gaming Monitor which you can now pick up for just 75% of its recommended retail price. The RRP of this monitor is £1,199, but thanks to this deal, you can get it for just £898.99 for a limited time (purchase link down below). With its 4K display, 240Hz refresh rate, and 0.03ms GTG, you’ll have the edge over other gamers by avoiding lag. At 31.5-inches, it’s the ideal monitor size if you’re sitting up close to it at a desk, you don’t want it too big at such a short range, but you also want to be able to see all the image details so 31.5-inches is a good balance. What makes QD-OLED stand out? There are loads of terms used to describe displays such as AMOLED, OLED, LED, and it can all get a bit confusing. This monitor adds yet another acronym called QD-OLED, which stands for Quantum Dot OLED. For you as a buyer, this means your new monitor has self-emitting pixels that deliver great black levels. It also features an enhanced sub-pixel arrangement for extra sharpness. The 31.5-inch 4K UHD monitor has a 3,840 x 2,160 pixel resolution making it ideal for playing games, but also watching movies in the best quality. Other important features worth mentioning are the 1.07 billion colors (10-bit) that the monitor can produce, its 99% DCI-P3 support, and DisplayHDR True Black 400 certification. All of these things make the monitor produce more accurate colours, potentially making it a good choice for professionals editing videos and photos too. Obviously, games will look good too. MSI has also packed in a fanless graphene heatsink which should help to increase the durability of the monitor long-term. This could extend the time until you need to buy a new monitor, further justifying its almost £900 price tag. Gaming and productivity features It’s not just the hardware that makes this monitor excel for gaming, it also comes with great software enhancements and connectivity options. On the software side, you get the following features: Smart Crosshair: Projects a customizable crosshair onto the screen to improve hip-fire accuracy and iron sights in first-person shooter games. Optix Scope: Gives you a built-in aim magnifier with multi-stage zooming and shortcut keys to quickly switch magnification levels. AI Vision: This automatically enhances brightness and colour saturation, particularly in dark areas of the screen, making it easier to see enemies hiding in shadows or dark corners. If you have two separate systems you want to connect to the monitor at once, you can do so with this monitor thanks to KVM support. You can view both sources with Picture-in-Picture and Picture-by-Picture modes. The MSI MPG 321URX QD-OLED 31.5 Inch 4K UHD Gaming Monitor also supports next-gen consoles with features like HDMI CEC Profile Sync, HDMI Variable Refresh Rate (VRR), and 4K:4K downscaling. In terms of connectivity and ergonomics, you get DisplayPort 1.4a, 2x HDMI 2.1 (CEC), USB Type-C with 90W power delivery, and a USB hub. The monitor uses a tilt-, swivel- & height-adjustable stand that is VESA compatible. Should you buy this monitor? The MSI MPG 321URX QD-OLED 31.5 Inch 4K UHD Gaming Monitor is definitely a product for serious gamers looking for top-tier visual fidelity and performance or content creators who need accurate colours and high resolution. Even with the significant discount, it’s still at a premium price and definitely not for everyone. If you are in one of the groups mentioned, then you should give serious consideration to buying the MSI MPG 321URX QD-OLED 31.5 Inch 4K UHD Gaming Monitor as it's the lowest price the monitor has been at on Amazon to date. MSI MPG 321URX QD-OLED 31.5 Inch 4K Gaming Monitor: £898.99 (Amazon UK) / RRP £1,199 This Amazon deal is U.K. specific, and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon UK deals page here. Get Prime, Prime Video, Music Unlimited, Audible or Kindle Unlimited, free for the first 30 days As an Amazon Associate we earn from qualifying purchases.
-
-
Recent Achievements
-
computerdave91111 went up a rank
Enthusiast
-
Falisha Manpower earned a badge
Week One Done
-
elsa777 earned a badge
One Month Later
-
elsa777 earned a badge
Week One Done
-
K Dorman earned a badge
First Post
-
-
Popular Contributors
-
Tell a friend
Question
The Teej
Okay guys and gals, I am absolutely 100% stumped on this one. I genuinely cannot seem to resolve this one. I've been trying for 5 days, experimenting, googling, all to no avail. I usually like to solve my own coding problems and try for as long as I can to resolve it, but this time I need some outside advice!
Basically, I'm using DirectX for my input. I have a CInput class using dinput.h to grab keyboard inputs. My compiler is MSVC++ 2010.
CInput.h
CInput.cpp
// input.cpp: implementation of the Cinput class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Input.h"
#include <windows.h>
#include <OBJBASE.H>
extern HWND g_hWnd;
extern HINSTANCE hInst;
LPDIRECTINPUT lpdi; //pointer to direct input object
LPDIRECTINPUTDEVICE lpdikey; //the keyboard device
//storage for keyboard state
UCHAR keystate[256];
UCHAR oldkeystate[256];
bool keydown[256];
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CInput::CInput()
{
if (DirectInputCreateA(hInst, DIRECTINPUT_VERSION, &lpdi, NULL)!=DI_OK)
{
// DirectInput not available; take appropriate action
}
//create keyboard device
if(lpdi->CreateDevice(GUID_SysKeyboard, &lpdikey, NULL)!=DI_OK)
{
//error
}
//set cooperation level
if(lpdikey->SetCooperativeLevel(g_hWnd, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)!=DI_OK)
{
//error
}
//set data format
if(lpdikey->SetDataFormat(&c_dfDIKeyboard)!=DI_OK)
{
//error
}
//acquire the keyboard device
if(lpdikey->Acquire()!=DI_OK)
{
//error
}
}
CInput::~CInput()
{
//unaquire keyboard
lpdikey->Unacquire();
lpdi->Release();
}
//this method refreshes the CInput class's data on which keys are currently down
//this data is stored in an array called keystate[ ]
void
CInput::GetInput()
{
//copy old keystate array
int i;
for (i=0;i<256;i++)
{
oldkeystate[i]=keystate[i];
}
if (lpdikey->GetDeviceState(256,keystate)!=DI_OK)
{
//error
}
//now check which keys are now down that weren't down last time
for (i=0;i<256;i++)
{
if ((keystate[i]>0)&&(oldkeystate[i]==0))
{
//key is now down and it wasn't before
keydown[i]=1;
}
else
{
keydown[i]=0;
}
}
}
//use this method with DirectX character constants
//which are defined in dinput.h such as DIK_SPACE
//relies on the GetInput( ) method being called first to
//update the data on which keys are currently down
//if this method doesn't seem to work then make sure you
//are calling GetInput( ) first!!!
bool
CInput::GetIfKeyDown(int whichkey)
{
if ((whichkey>256)|(whichkey<0)) return 0;
return (bool)(keystate[whichkey] & 0x80);
}
//method returns 1 or 0 depending on whether
//specified key has just been pressed
bool
CInput::GetIfKeyDownEvent(int whichkey)
{
if ((whichkey>256)|(whichkey<0)) return 0;
return (bool)(keydown[whichkey]);
}
CInput * CInput::Instance()
{
if (0==_instance)
{_instance=new CInput();
}
return _instance;
}
CInput * CInput::_instance=0;
[/CODE]
When I go to make a build, however, it compiles the code but throws up the linker error which I told you about. Here's my output from building:
1> Generating Code...
1>Input.obj : error LNK2019: unresolved external symbol _DirectInputCreateA@16 referenced in function "protected: __thiscall CInput::CInput(void)" (??0CInput@@IAE@XZ)
1>D:\Developer\ttSideScrollerWin32 - 2011 version\Debug\ttSideScrollerWin32.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
[/CODE]
From what I've read, LNK2019 usually gets thrown when something isn't being included in your project or hasn't been defined. However, the CInput Constructor has definitely been defined in my header, with both CInput.h and CInput.cpp included in my project. DirectX SDK is definitely installed, my Linker Input in my Project Properties includes dxguid.lib, dinput.lib and dinput8.lib. My VC++ Directories for Input and Libraries explicitly include DirectX SDK's folders for Input and Libraries. I've gone through everything I can think of, but everything seems to be in place. I presume it's some sort of compiler issue of some kind, and one that's probably beyond my expertise. However, I'm open to any suggestions. I'm returning to programming after a fair few months of inactivity and so I'm a little rusty, which probably hasn't helped me solve this issue.
So, please Neowin, help me!!!
Link to comment
https://www.neowin.net/forum/topic/1123272-cmsvc-cannot-resolve-this-linker-error-lnk2019-directx-related/Share on other sites
2 answers to this question
Recommended Posts