Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

i have added some built in lib files in my VC code
when i built my code it gives me error that functions like fclose ,fseek , fcloseall
these are already declared . means in buit in lib files which code i can not see these functions are also declare there.

is there any way that i told my program not to use built in VC fclose , fseek function only use by default lib which is added that functions.

NOTE:
this problem arise if i use VC 6.0

Tis problem is not in "VISUAL STUDIO 8.0 C"
or "Visual Studio 10.0 C"

plz help how to skip VC built in function to use in my code
of vc6.0



Erroes which comes VC 6.0 are

Collapse | Copy Code

MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in LIBCD.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _signal already defined in LIBCD.lib(winsig.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
lapack.lib(dlartg.obj) : error LNK2001: unresolved external symbol __ftol2_sse
libf2c.lib(i_nint.obj) : error LNK2001: unresolved external symbol __ftol2_sse
lapack.lib(dggbak.obj) : error LNK2001: unresolved external symbol __ftol2_sse
lapack.lib(dggbal.obj) : error LNK2001: unresolved external symbol __ftol2_sse
lapack.lib(dlamch.obj) : error LNK2001: unresolved external symbol __ftol2_sse
lapack.lib(ilaenv.obj) : error LNK2001: unresolved external symbol __ftol2_sse
lapack.lib(ilaenv.obj) : error LNK2001: unresolved external symbol ___security_cookie
libf2c.lib(open.obj) : error LNK2001: unresolved external symbol ___security_cookie
libf2c.lib(wref.obj) : error LNK2001: unresolved external symbol ___security_cookie
libf2c.lib(endfile.obj) : error LNK2001: unresolved external symbol ___security_cookie
lapack.lib(ilaenv.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libf2c.lib(open.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libf2c.lib(wref.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libf2c.lib(endfile.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4




HERE lapack libf2c are lib files which i added in my program to use thier functions .

plz help Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 19-Aug-14 3:00am    
VB6? Are you serious? Why?! This is something dead; was already dead when it was first introduced to the market.
—SA
prog786 19-Aug-14 4:12am    
its VC 6.0 not VB 6.0

1 solution

You don't need to skip anything, you need to avoid defining functions which are already defined in the library, and avoid using those which are underfined. The list of the function names is shown in your linker error message. If you are not getting it, you need to learn what the linked does, or ask some follow-up questions on this topic, but first read about the linker operation.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900