Hi,
I am pretty new to C++ and I have been trying to develop an application using printers.
I need to list every printer installed, and I thought doing it using EnumPrinters.
I have read MSDN documentation on this, as well as some topics on this forum and didn't find an answer that fit.
I keep on having this error:
C:\Programação\C++\lab\main.cpp 23 undefined reference to `EnumPrintersA@28'
I am using codeBlocks and no GUI, just a simple CLI program.
Here follows the code I tried:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
DWORD pcbNeeded, pcbReturned;
LPSTR printer = NULL;