Hi Friends,
I am writing a program which uses CoCreateInstance( ) to create COM object. In the program I include these files:
#include <stdlib.h>
#include <iostream.h>
#include "stdafx.h"
#include <afxdisp.h>
#include <atlbase.h>
#include <jni.h>
but when I tried to compile it to generate .dll file from commandline, I always got the following errors:
mytest.cpp
C:\Program Files\Microsoft Visual Studio\VC98\mfc\include\afxv_w32.h(119) : warn
stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/dll
/implib:mytest.lib
/out:mytest.dll
mytest.obj
Creating library mytest.lib and object mytest.exp
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
mytest.dll : fatal error LNK1120: 3 unresolved externals
please help me to solve this problem.
thanks !