![]() |
Bizarre problem with the General Purpose SDK
...or maybe it's just me. As hungover as I am, I really can't discount the possiblity.
Anyway, I've been working on a general purpose plug-in for a little while now, using the SDK as a base, and I've had no problems with it until this. I added some code to the main window callback procedure to open a file, and write some data to it using fopen and fprintf. Using these required including stdio.h. Okay, no problem. Unfortunately, when I go to build it, the linker gives me "error LNK2001: unresolved external symbol _main". Removing these new lines allowed it to link properly. I find it odd that the linker is suddenly looking for a main function, when all I did was add a couple lines of file output code, and a basic include file. I'm using VisualC++ 6.0 on Win 98. Any thoughts, ideas, or outright criticisms would be appreciated. |
Make sure that you are building a DLL, not an EXE.
|
I'm just using the workspace that came with the Gen_SDK.. and it's been building as a DLL just fine until now... but I found something that fixed the problem.
In the General Linker Settings, I checked 'Ignore default libraries'.. and manually included msvcrt.lib into my project. Now it builds fine. Go figure. |
| All times are GMT. The time now is 11:21. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.