Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 466 467 [468] 469 470 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 887855 times)

Sergius

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7005 on: February 15, 2015, 04:31:15 pm »

I'm partial to Drupal, but it is a bit less user friendly than Wordpress.

It has a lot more mods tho, all of them free, and I like that they at least have coding good practices.

A lot of people hate Drupal tho. For some reason.
Logged

hops

  • Bay Watcher
  • Secretary of Antifa
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7006 on: February 17, 2015, 08:22:07 pm »

Can you call functions in Python through list?

Like, for example:

Code: [Select]
def HelloWorld():
    print('Hello, world!')
    return;

list = [HelloWorld]
list[0]

Logged
she/her. (Pronouns vary over time.) The artist formerly known as Objective/Cinder.

One True Polycule with flame99 <3

Avatar by makowka

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7007 on: February 17, 2015, 08:24:04 pm »

Code: [Select]
def HelloWorld():
    print('Hello, world!')
    return;

list = [HelloWorld]
list[0]()

Yep, that works.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7008 on: February 17, 2015, 08:24:45 pm »

What Putnam said. But note that he changed the code a bit.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7009 on: February 17, 2015, 08:26:36 pm »

Also, you don't need the return and AFAIK you especially don't need the semicolon, heh.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #7010 on: February 17, 2015, 08:42:49 pm »

Semicolons after a return do nothing. Just wasted bits.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7011 on: February 17, 2015, 10:50:29 pm »

Return -should- be pretty important, though. I know a lot of scripting languages need key words like that to end functions.

For future reference, is there anyone here fluent in LUA?

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #7012 on: February 17, 2015, 10:57:59 pm »

Return -should- be pretty important, though. I know a lot of scripting languages need key words like that to end functions.
Not in Python. Return is only necessary if you want to end a function while there's still code that would otherwise be executed. Usually it's wholly dependent on indents.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7013 on: February 18, 2015, 12:08:43 am »

Return -should- be pretty important, though. I know a lot of scripting languages need key words like that to end functions.

For future reference, is there anyone here fluent in LUA?

Yes. Also, Lua, not LUA.

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7014 on: February 18, 2015, 01:09:13 am »

'scuse me. Good to know, though.

anzki4

  • Bay Watcher
  • On the wings of maybe
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7015 on: February 19, 2015, 11:38:43 am »

Is anyone familiar with the wonderful Java Swing library. I want to stop JComponent from calling revalidate whenever it's properties are changed and instead revalidate only whenever specifically instructed. (This is to be able to edit properties of multiple JComponent's and then repaint the whole lot of them, instead of the default behaviour of revalidating whenever it's properties are changed and thus putting it to a queue to be repainted.
Logged

BlindKitty

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7016 on: February 20, 2015, 01:22:02 am »

Return -should- be pretty important, though. I know a lot of scripting languages need key words like that to end functions.

For future reference, is there anyone here fluent in LUA?

I know a bit or two about Lua as well. Also: it's Lua, not LUA, because it's not an abbreviation; Lua means 'moon' in Portuguese (at least Brazilian variation, as the language originated in Brazil). I find that this explanation makes it easier to remember the correct spelling. :)
Logged
My little roguelike craft-centered game thread. Check it out.

GENERATION 10: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7017 on: February 20, 2015, 12:48:45 pm »

I was going through the "Complete roguelike tutorial using C++ and libtcod". I decided to start over on my own, so I wouldn't have to deal with the unholy mess I had ended up with.
Somewhere throughout that I inserted all kinds of stuff, like attributes for actors, for example. The thing with that is that attributes would be used at multiple points, which made it necessary to use shared pointers (which is recommended either way, as I hear). Because the way the tutorial does serialization doesn't work well with pointers to the same object in multiple places I decided to ditch TCODZip in favor of boost::serialization.

The problem is, it doesn't compile.
I have the following three files:
Code: (includes.hpp) [Select]
#ifndef SKYSCRAPERS_INCLUDES_HPP
#define SKYSCRAPERS_INCLUDES_HPP

#include <memory>
#include "libtcod.hpp"
#include "boost/serialization/serialization.hpp"
#include "boost/serialization/shared_ptr.hpp"

namespace boost
{
  namespace serialization
  {
    class access ;

    template < typename Archive >
    void serialize ( Archive & ar ,
                     TCODColor & color ,
                     const unsigned version ) ;
  }
}

#endif
Code: (map.hpp) [Select]
#ifndef SKYSCRAPERS_MAP_HPP
#define SKYSCRAPERS_MAP_HPP

#include "includes.hpp"
#include "tile.hpp"
#include <vector>
#include "boost/serialization/vector.hpp"

using namespace std ;

class Map
{
  // private members
  vector < vector < shared_ptr < Tile > > > plan ;

public :
  // special methods

  // static methods
  static shared_ptr < Map > genMap ( ) ;

  // methods
  static shared_ptr < Map >
  fromFile ( unsigned level ,
             unsigned x , unsigned y ) ;
  shared_ptr < Tile > getTile ( unsigned x , unsigned y ) ;

  // members
  unsigned level
    , x , y ;

  // components

private :
  friend class boost::serialization::access ;

  template < typename Archive >
  void serialize ( Archive & ar ,
                   const unsigned version )
  {
    // serialize members
    ar & plan ;

    // serialize components
  }
} ;

#endif
Code: (map.cpp) [Select]
#include "map.hpp"
#include "tile.hpp"
#include <string>
#include <fstream>
#include "boost/archive/text_iarchive.hpp"

using namespace std ;

// map generation
static shared_ptr < Map > fromFile ( unsigned level ,
                                     unsigned x , unsigned y )
{
  string mapSaveName = "saves/maps/"
    + to_string ( level )
    + to_string ( x )
    + to_string ( y ) ;
  ifstream mapStream ( mapSaveName ) ;
  boost::archive::text_iarchive mapArchive ( mapStream ) ;
  shared_ptr < Map > map ;
  mapArchive >> map ;
}

// implementation
shared_ptr < Tile > Map::getTile ( unsigned x , unsigned y )
{
  return plan[x][y] ;
}
When I try to compile I get the following error:
Code: [Select]
g++ -DHAVE_CONFIG_H -I. -I..    -I../include -std=c++11 -g -O2 -MT skyscrapers-map.o -MD -MP -MF .deps/skyscrapers-map.Tpo -c -o skyscrapers-map.o `test -f 'map.cpp' || echo './'`map.cpp
In file included from /usr/include/boost/serialization/serialization.hpp:44:0,
                 from includes.hpp:6,
                 from map.hpp:4,
                 from map.cpp:1:
Code: [Select]
/usr/include/boost/serialization/access.hpp:118:9: error: ‘class std::shared_ptr<Map>’ has no member named ‘serialize’
         t.serialize(ar, file_version);
         ^
Any idea what I am doing wrong? I thought including "boost/serialization/shared_ptr.hpp" should take care of serializing them and templates made sure I could serialize anything in a shared pointer when it itself can be serialized.
Logged
Taste my Paci-Fist

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7018 on: February 21, 2015, 03:56:58 pm »

Okay, there seems to be something wrong with my libboost installation. Or maybe I am stupid. How should i know?
[edit]Turns out I need to link to libboost_serialization when compiling…[/edit]

This is my source code, because what didn't work was becoming ridiculous:
Code: [Select]
#include <boost/archive/text_oarchive.hpp>
#include <iostream>

int main ( int argv, char * argc [ ] )
{
  boost::archive::text_oarchive oa ( std::cout ) ;
  int i = 1 ;
  oa << i ;
}
This gives me the following barrage of errors:
Code: [Select]
/tmp/ccAXKj4K.o: In function `boost::archive::text_oarchive::text_oarchive(std::ostream&, unsigned int)':
main.cpp:(.text._ZN5boost7archive13text_oarchiveC2ERSoj[_ZN5boost7archive13text_oarchiveC5ERSoj]+0x14): undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::ostream&, unsigned int)'
/tmp/ccAXKj4K.o: In function `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl()':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED2Ev[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED5Ev]+0x29): undefined reference to `boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()'
/tmp/ccAXKj4K.o: In function `boost::archive::detail::common_oarchive<boost::archive::text_oarchive>::~common_oarchive()':
main.cpp:(.text._ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEED2Ev[_ZN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEED5Ev]+0x17): undefined reference to `boost::archive::detail::basic_oarchive::~basic_oarchive()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, int>(boost::archive::text_oarchive&, int const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveEiEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveEiEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<int>(int const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveIiEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveIiEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<int>(int const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIiEEvRKT_]+0x8c): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception const&)':
main.cpp:(.text._ZN5boost7archive17archive_exceptionC1ERKS1_[_ZN5boost7archive17archive_exceptionC1ERKS1_]+0x27): undefined reference to `vtable for boost::archive::archive_exception'
main.cpp:(.text._ZN5boost7archive17archive_exceptionC1ERKS1_[_ZN5boost7archive17archive_exceptionC1ERKS1_]+0x3b): undefined reference to `vtable for boost::archive::archive_exception'
/tmp/ccAXKj4K.o: In function `void boost::serialization::throw_exception<boost::archive::archive_exception>(boost::archive::archive_exception const&)':
main.cpp:(.text._ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_[_ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_]+0x2c): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_[_ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_]+0x31): undefined reference to `typeinfo for boost::archive::archive_exception'
/tmp/ccAXKj4K.o:(.rodata._ZTIN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEEE[_ZTIN5boost7archive6detail15common_oarchiveINS0_13text_oarchiveEEE]+0x10): undefined reference to `typeinfo for boost::archive::detail::basic_oarchive'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::version_type>(boost::archive::text_oarchive&, boost::archive::version_type const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_12version_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_12version_typeEEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::object_id_type>(boost::archive::text_oarchive&, boost::archive::object_id_type const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_14object_id_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_14object_id_typeEEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::object_reference_type>(boost::archive::text_oarchive&, boost::archive::object_reference_type const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_21object_reference_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_21object_reference_typeEEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::class_id_type>(boost::archive::text_oarchive&, boost::archive::class_id_type const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_13class_id_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_13class_id_typeEEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, boost::archive::class_id_reference_type>(boost::archive::text_oarchive&, boost::archive::class_id_reference_type const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_23class_id_reference_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_23class_id_reference_typeEEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
/tmp/ccAXKj4K.o:main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_13tracking_typeEEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveENS0_13tracking_typeEEEvRT_RKT0_]+0xe): more undefined references to `boost::archive::detail::basic_oarchive::end_preamble()' follow
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<boost::archive::object_id_type>(boost::archive::object_id_type const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_14object_id_typeEEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_14object_id_typeEEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<boost::archive::object_reference_type>(boost::archive::object_reference_type const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_21object_reference_typeEEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_21object_reference_typeEEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<boost::archive::class_id_type>(boost::archive::class_id_type const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_13class_id_typeEEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_13class_id_typeEEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<boost::archive::class_id_reference_type>(boost::archive::class_id_reference_type const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_23class_id_reference_typeEEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_23class_id_reference_typeEEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o: In function `void boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save<boost::archive::tracking_type>(boost::archive::tracking_type const&)':
main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_13tracking_typeEEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveINS0_13tracking_typeEEEvRKT_]+0xe): undefined reference to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()'
/tmp/ccAXKj4K.o:main.cpp:(.text._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveIjEEvRKT_[_ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEE4saveIjEEvRKT_]+0xe): more undefined references to `boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()' follow
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<boost::archive::object_id_type>(boost::archive::object_id_type const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_]+0x97): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<boost::archive::object_reference_type>(boost::archive::object_reference_type const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_]+0x98): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<boost::archive::class_id_type>(boost::archive::class_id_type const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_]+0x97): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<boost::archive::class_id_reference_type>(boost::archive::class_id_reference_type const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_]+0x98): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `void boost::archive::save_access::save_primitive<boost::archive::text_oarchive, std::string>(boost::archive::text_oarchive&, std::string const&)':
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveESsEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveESsEEvRT_RKT0_]+0xe): undefined reference to `boost::archive::detail::basic_oarchive::end_preamble()'
main.cpp:(.text._ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveESsEEvRT_RKT0_[_ZN5boost7archive11save_access14save_primitiveINS0_13text_oarchiveESsEEvRT_RKT0_]+0x20): undefined reference to `boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::string const&)'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<boost::archive::tracking_type>(boost::archive::tracking_type const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_]+0x98): undefined reference to `boost::archive::archive_exception::~archive_exception()'
/tmp/ccAXKj4K.o: In function `void boost::archive::basic_text_oprimitive<std::ostream>::save<unsigned int>(unsigned int const&)':
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_]+0x3b): undefined reference to `boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_]+0x5f): undefined reference to `boost::archive::archive_exception::~archive_exception()'
main.cpp:(.text._ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_[_ZN5boost7archive21basic_text_oprimitiveISoE4saveIjEEvRKT_]+0x8c): undefined reference to `boost::archive::archive_exception::~archive_exception()'
collect2: error: ld returned 1 exit status
Wat.
« Last Edit: February 21, 2015, 04:47:03 pm by Antsan »
Logged
Taste my Paci-Fist

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7019 on: February 21, 2015, 09:19:36 pm »

That probably means you haven't linked the library or boost cpp file that defines all those functions, you have used a header without importing the actual boost code that runs it.
Pages: 1 ... 466 467 [468] 469 470 ... 796