www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Symbol Undefined _snprintf

↑ ↓ ← cane <cane_member pathlink.com> writes:
I've got a line of code like this in a file:

snprintf(buffer, sizeof(buffer), "%sfd", argv[1]); 

When I try to compile&link this file with DMC it keeps telling me:

Error 42: Symbol Undefined _snprintf

should I link some specific library in addition?

Thanks, bye.
Nov 10 2005
↑ ↓ Bertel Brander <bertel post4.tele.dk> writes:
cane wrote:
 I've got a line of code like this in a file:
 
 snprintf(buffer, sizeof(buffer), "%sfd", argv[1]); 
 
 When I try to compile&link this file with DMC it keeps telling me:
 
 Error 42: Symbol Undefined _snprintf

snprintf is a C99 function, DMC is not (as far as i can tell) C99 complient. DMC has however a function called _snprintf (notice the _) which seems to do the same. -- Absolutely not the best homepage on the net: http://home20.inet.tele.dk/midgaard But it's mine - Bertel
Nov 10 2005
↑ ↓ → cane <x x.com> writes:
Bertel Brander wrote:

 snprintf is a C99 function, DMC is not (as far as i can tell)
 C99 complient.

Ouch! I didnt' know...
 DMC has however a function called _snprintf (notice the _)
 which seems to do the same.

Thanks, calling _snprintf() seems to solve the problem. Bye.
Nov 11 2005