I'm trying to create a DLL within Visual C++. The classes all used to be part of a "test program" with a main.cpp but now I am trying to move them to their own DLL and then have main.cpp reference them.
If it's relevant, here's an example of one of the classes:
Code:
#define dl0 __declspec(dllexport)
class c_Timer
{
private:
ALLEGRO_TIMER *timer;
public:
dl0 c_Timer();
dl0 void initTimer(); //Initializes the timer.
dl0 void startTimer(); //Starts the timer at a rate specified in game::state.fps.
dl0 void stopTimer(); //Stops the timer.
dl0 void destroyTimer(); //Frees up the timer's memory.
};
When I try to compile the entire project, I get no errors other than
Code:
warning LNK4086: entrypoint '_mainCRTStartup' is not __stdcall with 12 bytes of arguments; image may not run
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
Most of what I've found on Google says to change the Configuration Type from "Application" to "Dynamic Library", and I've done that to no avail.
Is there something I'm missing?
Also, should I be putting a dl0 before "ALLEGRO_TIMER *timer" as well?
Thanks!