I've been trying for hours but I can't seem to find what I am doing wrong.
the include section:
and then I get a linker error for each function I use(from the libjpeg).Code:#define _WIN32_WINNT 0x0500 // code will only run on Win2000 or higher - necessary for using queue timers //#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdlib.h> #include <tchar.h> #include <stdio.h> extern "C" { #include "jpeglib.h" #include "jerror.h" } #include <Mmsystem.h> // winmm.lib header, used for playing sound #undef MessageBox #include "AbstractGame.h" // needed to use abstract class as basis for all games #include "AbstractMode.h" // needed to use abstract class as basis for all modes #include <vector> // using std::vector for tab control logic#include <vector> #include <queue> #include <algorithm> using namespace std; #include "Defines.h" //----------------------------------------------------------------- // Pragma Library includes //----------------------------------------------------------------- #pragma comment(lib, "msimg32.lib") // used for transparency #pragma comment(lib, "winmm.lib") // used for sound
I'm not experienced with libs and dlls but when I take a look at jpeglib.h and I see what I presume are some sort of prototypes, I feel like I should be including something else but I don't have a clue. Other people who had this issue fixed it by putting the include in the extern "C" but this isn't the case with me.