News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

VC++?

Started by accelas, October 07, 2005, 01:42:11 AM

Previous topic - Next topic

accelas

I'm using Code::blocks w/ VC++ toolkit, (since it's the only free ide, which supposed to work out of the box w/ VC++ tk).

Well, I'm trying to compile the test example come with libusb-win32. VC++ linker gives me a strange error (admittedly, C/C++ isn't my thing, i do most work with assembly on MCU's), that the function snprintf isn't found. After googling around I found that snprintf is a part of standard C lib, meaning it should be included in libc.lib, which in fact is in my lib search path. When I tried to change libc.lib to another location/version. It gave me the same error plus few more.

I uses standard compiling command come with Code:Block as below

link.exe /nologo    /LIBPATH:"C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib" /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" /LIBPATH:"C:\Program Files\Microsoft.NET\SDK\v1.1\Lib" /out:"C:\Documents and Settings\accelas\Desktop\project\console.exe"    "C:\Documents and Settings\accelas\Desktop\project\lib\msvc\libusb.lib" .objs\testlibusb.obj

Does anyone have some ideas?

sethjackson

You have created a project right?

To use snprintf()

you need to do this


#include <stdio.h>
#include <stdlib.h>


It is in one of those headers not sure which one because I don't use C functions very much (mainly becuase I use C++).

mandrav

QuoteVC++ linker gives me a strange error

And the strange error is???
Be patient!
This bug will be fixed soon...

zieQ

And libc (or another lib with the c standard functions) is automatically included by the linker, no need to worry about putting it to the linker options.
Want to see the linker errror too, since VC++ lacks some libraries (multi-threaded...) :wink: