mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
build errors
This commit is contained in:
parent
53f656f028
commit
1acf84fcfe
@ -70,18 +70,3 @@ string_to_wstring(wstring &result, const string &source) {
|
||||
return success;
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
#ifdef _WIN32
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wstring ostream operator
|
||||
// Description: Converts the wstring to utf-8 for output.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ostream &
|
||||
operator << (ostream &out, const wstring &str) {
|
||||
string result;
|
||||
if (wstring_to_string(result, str)) {
|
||||
out << result;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
@ -25,7 +25,16 @@ using namespace std;
|
||||
bool wstring_to_string(string &result, const wstring &source);
|
||||
bool string_to_wstring(wstring &result, const string &source);
|
||||
|
||||
ostream &operator << (ostream &out, const wstring &str);
|
||||
// We declare this inline so it won't conflict with the similar
|
||||
// function defined in Panda's textEncoder.h.
|
||||
inline ostream &operator << (ostream &out, const wstring &str) {
|
||||
string result;
|
||||
if (wstring_to_string(result, str)) {
|
||||
out << result;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#endif
|
||||
|
@ -568,3 +568,16 @@ INLINE wstring TextEncoder::
|
||||
decode_text(const string &text) const {
|
||||
return decode_text(text, _encoding);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wstring ostream operator
|
||||
// Description: Uses the current default encoding to output the
|
||||
// wstring.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE ostream &
|
||||
operator << (ostream &out, const wstring &str) {
|
||||
TextEncoder encoder;
|
||||
encoder.set_wtext(str);
|
||||
out << encoder.get_text();
|
||||
return out;
|
||||
}
|
||||
|
@ -385,16 +385,3 @@ operator >> (istream &in, TextEncoder::Encoding &encoding) {
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: wstring ostream operator
|
||||
// Description: Uses the current default encoding to output the
|
||||
// wstring.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
ostream &
|
||||
operator << (ostream &out, const wstring &str) {
|
||||
TextEncoder encoder;
|
||||
encoder.set_wtext(str);
|
||||
out << encoder.get_text();
|
||||
return out;
|
||||
}
|
||||
|
@ -120,7 +120,11 @@ operator >> (istream &in, TextEncoder::Encoding &encoding);
|
||||
|
||||
// We'll define the output operator for wstring here, too. Presumably
|
||||
// this will not be automatically defined by any system libraries.
|
||||
EXPCL_DTOOL ostream &
|
||||
|
||||
// This function is declared inline to minimize the risk of link
|
||||
// conflicts should another third-party module also define the same
|
||||
// output operator.
|
||||
INLINE EXPCL_DTOOL ostream &
|
||||
operator << (ostream &out, const wstring &str);
|
||||
|
||||
#include "textEncoder.I"
|
||||
|
@ -3820,6 +3820,7 @@ if (RTDIST or RUNTIME):
|
||||
OPTS += ['ZLIB', 'JPEG', 'PNG', 'MSIMG']
|
||||
TargetAdd('plugin_plugin.obj', opts=OPTS, input='p3d_plugin_composite1.cxx')
|
||||
TargetAdd('plugin_mkdir_complete.obj', opts=OPTS, input='mkdir_complete.cxx')
|
||||
TargetAdd('plugin_wstring_encode.obj', opts=OPTS, input='wstring_encode.cxx')
|
||||
TargetAdd('plugin_parse_color.obj', opts=OPTS, input='parse_color.cxx')
|
||||
TargetAdd('plugin_get_twirl_data.obj', opts=OPTS, input='get_twirl_data.cxx')
|
||||
TargetAdd('plugin_find_root_dir.obj', opts=OPTS, input='find_root_dir.cxx')
|
||||
@ -3833,6 +3834,7 @@ if (RTDIST or RUNTIME):
|
||||
for fname in ["p3d_plugin.dll", "libp3d_plugin_static.ilb"]:
|
||||
TargetAdd(fname, input='plugin_plugin.obj')
|
||||
TargetAdd(fname, input='plugin_mkdir_complete.obj')
|
||||
TargetAdd(fname, input='plugin_wstring_encode.obj')
|
||||
TargetAdd(fname, input='plugin_parse_color.obj')
|
||||
TargetAdd(fname, input='plugin_find_root_dir.obj')
|
||||
if (sys.platform == "darwin"):
|
||||
@ -3913,6 +3915,7 @@ if (RUNTIME and PkgSkip("NPAPI")==0):
|
||||
TargetAdd('nppanda3d.plugin', input='plugin_common.obj')
|
||||
TargetAdd('nppanda3d.plugin', input='plugin_parse_color.obj')
|
||||
TargetAdd('nppanda3d.plugin', input='plugin_get_twirl_data.obj')
|
||||
TargetAdd('nppanda3d.plugin', input='plugin_wstring_encode.obj')
|
||||
TargetAdd('nppanda3d.plugin', input='plugin_npapi_nppanda3d_composite1.obj')
|
||||
if (sys.platform.startswith("win")):
|
||||
TargetAdd('nppanda3d.plugin', input='nppanda3d.res')
|
||||
@ -3942,6 +3945,7 @@ if (RUNTIME and sys.platform.startswith("win")):
|
||||
TargetAdd('p3dactivex.ocx', input='plugin_common.obj')
|
||||
TargetAdd('p3dactivex.ocx', input='plugin_parse_color.obj')
|
||||
TargetAdd('p3dactivex.ocx', input='plugin_get_twirl_data.obj')
|
||||
TargetAdd('p3dactivex.ocx', input='plugin_wstring_encode.obj')
|
||||
TargetAdd('p3dactivex.ocx', input='plugin_activex_p3dactivex_composite1.obj')
|
||||
TargetAdd('p3dactivex.ocx', input='P3DActiveX.res')
|
||||
TargetAdd('p3dactivex.ocx', input='P3DActiveX.def', ipath=OPTS)
|
||||
@ -3973,6 +3977,7 @@ if (RUNTIME):
|
||||
TargetAdd('panda3d.exe', input='plugin_standalone_panda3dMain.obj')
|
||||
TargetAdd('panda3d.exe', input='plugin_standalone_panda3dBase.obj')
|
||||
TargetAdd('panda3d.exe', input='plugin_common.obj')
|
||||
TargetAdd('panda3d.exe', input='plugin_wstring_encode.obj')
|
||||
if (sys.platform == "darwin"):
|
||||
TargetAdd('panda3d.exe', input='plugin_find_root_dir_assist.obj')
|
||||
elif (sys.platform.startswith("win")):
|
||||
@ -4004,6 +4009,7 @@ if (RUNTIME):
|
||||
TargetAdd('panda3dw.exe', input='plugin_standalone_panda3d.obj')
|
||||
TargetAdd('panda3dw.exe', input='plugin_standalone_panda3dWinMain.obj')
|
||||
TargetAdd('panda3dw.exe', input='plugin_standalone_panda3dBase.obj')
|
||||
TargetAdd('panda3dw.exe', input='plugin_wstring_encode.obj')
|
||||
TargetAdd('panda3dw.exe', input='plugin_common.obj')
|
||||
TargetAdd('panda3dw.exe', input='libpandaexpress.dll')
|
||||
TargetAdd('panda3dw.exe', input='libp3dtoolconfig.dll')
|
||||
|
Loading…
x
Reference in New Issue
Block a user