Hi all
I’m trying to build a DLL file but
I’ve met a error named
“libc.lib(crt0.obj) : error LNK2001:unresolved external symbol _main”
before this, i’ve caught my bugs. After then it occured.
I’ve searched for the same error and solution in the internet,
but most of the case were problem when using MFC.
I declared the DLLENTRY name in the ‘SOURCES’, but why is it finding
for “main”?
of course, i implemented the DLLEntry function in UIWrapper.c
this is my SOURCES file. And the directory contains the file
- precomp.h(include lots of header files - stdlib.h, stdio.h, winbase.h,
etc…) - UIWrapper.c(Source code i’ve made)
- UIWrapper.h(header file for UIWrapper.c)
- UIWRAPPER.def
- makefile
TARGETNAME=UIWRAPPER
TARGETPATH=obj
TARGETTYPE=DYNLINK
PRECOMPILED_CXX=1
PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_OBJ=precomp.obj
#C_DEFINES=$(C_DEFINES) -DUMODE -DSTRICT -D_UNICODE -DUNICODE
TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\advapi32.lib \
$(SDK_LIB_PATH)\winspool.lib \
$(SDK_LIB_PATH)\ole32.lib \
$(SDK_LIB_PATH)\uuid.lib
DLLENTRY=DllInitialize
INCLUDES=.;$(SDK_INC_PATH)\MFC42
MSC_WARNING_LEVEL=/W3
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
SOURCES= UIWrapper.c
Is there any problem with my SOURCES file?
Or did i missed someting?
Please give me advice,
i’ll be looking forward to it.
-with respect
Souneil Park.