University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Compile error in sbm_speech_audiofile.cpp | General SmartBody Discussion | Forum


Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Compile error in sbm_speech_audiofile.cpp
June 21, 2012
12:46 am
Forum Posts: 80
Member Since:
June 13, 2012
sp_UserOfflineSmall Offline

In smartbody-lib/src/sbm/sbm_speech_audiofile.cpp, there is recently-added code that uses _fullpath, a Windows-only API. The POSIX equivalent to

_fullpath( fullAudioPath, relativeAudioPath.c_str(), _MAX_PATH )

would be

realpath( relativeAudioPath.c_str(), fullAudioPath )

(This forum software doesn't support any formatting markup?)

What convention does SmartBody use for platform-specific code, something like #if WIN32?

June 21, 2012
2:30 pm
Forum Posts: 985
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

We try to use cross-platform APIs as much as possible. In this case, we should have used the boost filesystem API as we are doing later in that same file. For cases when we need to do something platform specific, we are doing:

#ifdef WIN32


#ifdef __APPLE__


#ifdef __ANDROID__

Sometimes, a functioning OSX build will lag a day or two behind the latest Windows version.

I'll check in these fixes for OSX.

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online:
66 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 53

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 74

Members: 2025

Moderators: 1

Admins: 3

Forum Stats:

Groups: 1

Forums: 5

Topics: 527

Posts: 2473

Moderators: smbyadmin: 0