← Back to team overview

leaningtech-dev team mailing list archive

[Bug 1254187] [NEW] Undefined JS functions called (std::string char_traits)

 

Public bug reported:

I'm trying to run the Hello Server example from http://leaningtech.com/duetto/examples/.
Duetto 0.9.1 is installed using Ubuntu/Debian packages (from http://ppa.launchpad.net/leaningtech-dev/duetto-ppa/ubuntu).
Since https://answers.launchpad.net/duetto/+question/238985 I've created a Tntnet-based server stub (https://gist.github.com/ArtemGr/7607371) which compiles and runs fine (/opt/duetto/bin/clang++ -duetto-side=server -std=c++11 -O3 duetto_server_stub.cpp /opt/duetto/share/duetto/deserializer.cpp HelloServer.cpp -o HelloServer -pthread -ltntnet -lcxxtools && ./HelloServer).

I've created hw.html:
<html><head>
<script type="text/javascript" src="duetto.js"></script>
<script type="text/javascript" src="HelloServer.js"></script>
</head><body></body></html>
And duetto.js is a symbolic link to /opt/duetto/share/duetto/examples/duetto.js

When I try to run it in the browser I get a JavaScript error
"ReferenceError:
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj
is not defined" in HelloServer.js:5.

Here's the HelloServer.js: http://pastebin.com/0WBatpUx
And here's the duetto.js: http://pastebin.com/wQB3kjS9

It seems Duetto generates a JavaScript file with symbols absent from the
duetto.js.

** Affects: duetto
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of
Leaningtech Team, which is subscribed to Duetto.
https://bugs.launchpad.net/bugs/1254187

Title:
  Undefined JS functions called (std::string char_traits)

Status in Duetto: C++ for the Web:
  New

Bug description:
  I'm trying to run the Hello Server example from http://leaningtech.com/duetto/examples/.
  Duetto 0.9.1 is installed using Ubuntu/Debian packages (from http://ppa.launchpad.net/leaningtech-dev/duetto-ppa/ubuntu).
  Since https://answers.launchpad.net/duetto/+question/238985 I've created a Tntnet-based server stub (https://gist.github.com/ArtemGr/7607371) which compiles and runs fine (/opt/duetto/bin/clang++ -duetto-side=server -std=c++11 -O3 duetto_server_stub.cpp /opt/duetto/share/duetto/deserializer.cpp HelloServer.cpp -o HelloServer -pthread -ltntnet -lcxxtools && ./HelloServer).

  I've created hw.html:
  <html><head>
  <script type="text/javascript" src="duetto.js"></script>
  <script type="text/javascript" src="HelloServer.js"></script>
  </head><body></body></html>
  And duetto.js is a symbolic link to /opt/duetto/share/duetto/examples/duetto.js

  When I try to run it in the browser I get a JavaScript error
  "ReferenceError:
  __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj
  is not defined" in HelloServer.js:5.

  Here's the HelloServer.js: http://pastebin.com/0WBatpUx
  And here's the duetto.js: http://pastebin.com/wQB3kjS9

  It seems Duetto generates a JavaScript file with symbols absent from
  the duetto.js.

To manage notifications about this bug go to:
https://bugs.launchpad.net/duetto/+bug/1254187/+subscriptions


Follow ups

References