link time error in vc++ when using confuse library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

link time error in vc++ when using confuse library

Sabir-2
Hello everyone,

When i try to compile http://www.nongnu.org/confuse/cfgtest.c.html and http://www.nongnu.org/confuse/test.conf I get a link time error.

I have added libconfuse.lib inside linker->input->"additional depenendencies" as libConfuse.lib and also given path of lib linker->General ->"additional link directory" . as "F:\confuse-2.6\windows\msvc6\libConfuse"
 Also c/c++ ->general->"additinal inut directory" ->" "F:\confuse-2.6\src"

Also include directory as

#ifdef __cplusplus
extern "C" {
#endif
    #include <confuse.h>
#ifdef  __cplusplus
}
#endif

Still i get link error as

1>------ Build started: Project: testconfuse, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>f:\products\testconfuse\testconfuse\testconfuse\main.cpp(225) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen'
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_opt_getnint referenced in function "void __cdecl print_ask(struct cfg_opt_t *,unsigned int,struct _iobuf *)" (?print_ask@@YAXPAUcfg_opt_t@@IPAU_iobuf@@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_title referenced in function "int __cdecl cb_validate_bookmark(struct cfg_t *,struct cfg_opt_t *)" (?cb_validate_bookmark@@YAHPAUcfg_t@@PAUcfg_opt_t@@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getstr referenced in function "int __cdecl cb_validate_bookmark(struct cfg_t *,struct cfg_opt_t *)" (?cb_validate_bookmark@@YAHPAUcfg_t@@PAUcfg_opt_t@@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_opt_getnsec referenced in function "int __cdecl cb_validate_bookmark(struct cfg_t *,struct cfg_opt_t *)" (?cb_validate_bookmark@@YAHPAUcfg_t@@PAUcfg_opt_t@@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_opt_size referenced in function "int __cdecl cb_validate_bookmark(struct cfg_t *,struct cfg_opt_t *)" (?cb_validate_bookmark@@YAHPAUcfg_t@@PAUcfg_opt_t@@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_free referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_print referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_set_print_func referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getnint referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getnfloat referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getnstr referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getsec referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getbool referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getnsec referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_size referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_setstr referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_getint referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_parse referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_set_validate_func referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_init referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__cfg_include referenced in function _main
1>F:\products\testconfuse\testconfuse\Debug\testconfuse.exe : fatal error LNK1120: 21 unresolved externals
1>Build log was saved at "file://f:\products\testconfuse\testconfuse\testconfuse\Debug\BuildLog.htm"
1>testconfuse - 22 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


--
With Regards,
Sabir
+91 9895365676


Success is mostly in the attitude. “I always felt that my greatest asset was not my physical ability, it was my mental ability.”

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel