PDA

View Full Version : _vsnprintf with Linux?



wbest
June 23rd, 2009, 05:07 PM
I'm working on porting some C++ code from Windows to Linux.

I ran into an error with the function _vsnprint(...), which I believe may be in the Windows API. Any suggestions as to fixing this, WITHOUT Wine?

I'm trying to avoid wine as much as possible, it doesn't have the compiling abilities I need it to have right now, unless you have suggestions for quickly compiling things in Wine (Also be advised I cannot connect to Synaptic or download files offline, this is for work and they have these restrictions about download files and programs that you need to be able to get your work done).

jonobr
June 23rd, 2009, 05:46 PM
Hello


I recommend you post this in the programming section.

Post there move by a lot slower and are looked over by geniuses.

wbest
June 23rd, 2009, 05:55 PM
I'm working on porting some C++ code from Windows to Linux.

I ran into an error with the function _vsnprint(...), which I believe may be in the Windows API. Any suggestions as to fixing this, WITHOUT Wine?

I'm trying to avoid wine as much as possible, it doesn't have the compiling abilities I need it to have right now, unless you have suggestions for quickly compiling things in Wine (Also be advised I cannot connect to Synaptic or download files offline, this is for work and they have these restrictions about download files and programs that you need to be able to get your work done).

wbest
June 23rd, 2009, 05:57 PM
Moved.

I don't know why I never thought of putting thing there before...Laziness I suppose.

Zugzwang
June 23rd, 2009, 06:00 PM
Just drop the leading "_", vsnprintf is also available in Linux:

http://opengroup.org/onlinepubs/007908799/xsh/vsprintf.html

dwhitney67
June 23rd, 2009, 06:19 PM
Look at the man-page for vsnprintf.


man vsnprintf

nvteighen
June 23rd, 2009, 06:30 PM
The _vsnprintf function does exist, but it's meant to be private (it's a static function). Use vsnprintf.

Sef
June 23rd, 2009, 11:54 PM
Merged duplicate posts.