__vfscanf with Visual Studio in Fox 1.6.36

View: New views
3 Messages — Rating Filter:   Alert me  

__vfscanf with Visual Studio in Fox 1.6.36

by Emmett McQuinn-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have errors linking an application that uses the Fox 1.6.36 library with Visual Studio 9.0. Visual Studio provides the following errors:

LIBCMTD.lib(fscanf.obj) : error LNK2005: _vfscanf already defined in foxd-1.6.lib(vsscanf.obj)
..\bin\win\DeskVOX.exe : fatal error LNK1169: one or more multiply defined symbols found

I tried changing the HAVE_VFSCANF flag but this fails in compilation, and I've also selectively disabled the vfscanf in the fox library and this does not seem to work either. I have double checked that VC++9 was using the correct library directorys for FOX and LIBCMTD.

It looked like this was fixed with 1.6.21, any idea what might be going on, or if I can somehow disable linking vsscanf.obj?

Thanks,
-Emmett McQuinn

------------------------------------------------------------------------------
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: __vfscanf with Visual Studio in Fox 1.6.36

by Sergey Smirnov-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Probably your problems are due a statically linked runtime  
(LIBCMTD.lib). You should try a DLL runtime (multithreaded DLL for a  
release build and debug multithreaded DLL for debugging). Runtime  
library can be changed in the Properties of your VC project in  
Configuration Properties / C/C++ / Code Generation / Runtime Library.

Note that your application's runtime library and FOX's have to be the  
same.

Sergey


On Jun 30, 2009, at 5:44 AM, Emmett McQuinn wrote:

> I have errors linking an application that uses the Fox 1.6.36  
> library with Visual Studio 9.0. Visual Studio provides the  
> following errors:
>
> LIBCMTD.lib(fscanf.obj) : error LNK2005: _vfscanf already defined  
> in foxd-1.6.lib(vsscanf.obj)
> ..\bin\win\DeskVOX.exe : fatal error LNK1169: one or more multiply  
> defined symbols found
>
> I tried changing the HAVE_VFSCANF flag but this fails in  
> compilation, and I've also selectively disabled the vfscanf in the  
> fox library and this does not seem to work either. I have double  
> checked that VC++9 was using the correct library directorys for FOX  
> and LIBCMTD.
>
> It looked like this was fixed with 1.6.21, any idea what might be  
> going on, or if I can somehow disable linking vsscanf.obj?
>
> Thanks,
> -Emmett McQuinn
>
> ----------------------------------------------------------------------
> --------
> _______________________________________________
> Foxgui-users mailing list
> Foxgui-users@...
> https://lists.sourceforge.net/lists/listinfo/foxgui-users


------------------------------------------------------------------------------
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: __vfscanf with Visual Studio in Fox 1.6.36

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 29 June 2009, Emmett McQuinn wrote:
> I have errors linking an application that uses the Fox 1.6.36 library with Visual Studio 9.0. Visual Studio provides the following errors:
>
> LIBCMTD.lib(fscanf.obj) : error LNK2005: _vfscanf already defined in foxd-1.6.lib(vsscanf.obj)
> ..\bin\win\DeskVOX.exe : fatal error LNK1169: one or more multiply defined symbols found
>
> I tried changing the HAVE_VFSCANF flag but this fails in compilation, and I've also selectively disabled the vfscanf in the fox library and this does not seem to work either. I have double checked that VC++9 was using the correct library directorys for FOX and LIBCMTD.
>
> It looked like this was fixed with 1.6.21, any idea what might be going on, or if I can somehow disable linking vsscanf.obj?

Passing -DHAVE_VSSCANF is supposed to work; I believe it *does* work for Borland C++ on
Windows so I don't know why it didn't for VC++9.

Did you recompile *all* files with this flag?  The vsscanf() is declared in several
places...


        - Jeroen




--
+----------------------------------------------------------------------------+
| Copyright (C) 00:30 06/30/2009 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+

------------------------------------------------------------------------------
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users