peter_foelsche | 1 May 02:27 2008

undefined symbols

------ Build started: Project: boost_memory_mapped_io, Configuration: Release x64 ------

Linking...

main.obj : error LNK2001: unresolved external symbol "class boost::filesystem::file_status __cdecl boost::filesystem::detail::status_api(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::system::error_code &)" (?status_api <at> detail <at> filesystem <at> boost <at> <at> YA?AVfile_status <at> 23 <at> AEBV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> AEAVerror_code <at> system <at> 3 <at> <at> Z)

main.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category <at> system <at> boost <at> <at> YAAEBVerror_category <at> 12 <at> XZ)

main.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_posix_category(void)" (?get_posix_category <at> system <at> boost <at> <at> YAAEBVerror_category <at> 12 <at> XZ)

main.obj : error LNK2001: unresolved external symbol "struct std::pair<class boost::system::error_code,unsigned __int64> __cdecl boost::filesystem::detail::file_size_api(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?file_size_api <at> detail <at> filesystem <at> boost <at> <at> YA?AU?$pair <at> Verror_code <at> system <at> boost <at> <at> _K <at> std <at> <at> AEBV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> 5 <at> <at> Z)

C:\DocumentsAndSettings\pfoelsch\MyDocuments\boost_memory_mapped_io\x64\Release\boost_memory_mapped_io.exe : fatal error LNK1120: 4 unresolved externals

Build log was saved at "file://c:\DocumentsAndSettings\pfoelsch\MyDocuments\boost_memory_mapped_io\boost_memory_mapped_io\x64\Release\BuildLog.htm"

boost_memory_mapped_io - 5 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

 

see attached main.cpp

 

I link with

 

boost_system-vc80-mt-1_35.lib

boost_filesystem-vc80-mt-1_35.lib

 

and other boost libraries which are referenced directly.

I work on 64bit XP compiling for 64bit.

Attachment (main.cpp): application/octet-stream, 2594 bytes
_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
John Maddock | 1 May 10:16 2008
Picon

Re: Help! Application using Regex not working (Boostbuilding problem?)

Paula Costa wrote:
>> Hi,
>>
>> I've a Dev-Cpp, mingw, Windows XP development environment.
>> I'm trying to develop an application based on Regex but I'm not able
>> to run even the simple example from
>> "Getting Started" section of Boost documentation or the "Credit Card
>> Numbers" example from Regex.
>>
>> I've built the library through different ways (trying just to build
>> the regex library from John's homepage or
>> building the whole Boost library through bjam). The building process
>> was always OK and I'm pretty sure
>> that I'm correctly linking the files in Dev-Cpp (I also used the path
>> described at http://wagjo.com/index.php?id=27).
>>
>> However, I always get similar result: a lot of compiler messages
>> saying that I have "multiple definitions of something".
>>
>> Does anyone in this list could help me?

I've never seen that, but this message:

http://markmail.org/message/u7bube4nziebcaiy#query:multiple%20definition%20of%20typeinfo%20name%20for%20std%3A%3Aruntime_error+page:1+mid:u7bube4nziebcaiy+state:results 
seems to indicate that this may be a known problem with some Cygwin/Mingw32 
versions.  What g++ version are you using?  Is it a recent release?

The warning:

#warning "Unknown compiler version - please run the configure tests and
report the results"

suggests you're using a bleeding edge or unreleased g++ version maybe?

HTH, John.
Hicham Mouline | 1 May 13:25 2008

boost::result_of error?

Hello,
trying out Pete Becker's "c++ std lib ext" exercises, 
ex1 p155

#include <iostream>
#include <typeinfo>
#include <boost/utility/result_of.hpp>

typedef float (*floatfct)(float);
int main(int argc, char* argv[])
{
 typedef typename boost::result_of<floatfct(float, float)>::type resultype;
 std::cout<< typeid(resultype).name() << std::endl;
}

should fail, because result_of is instantiated with a callable type with 2 float args,
while it's been defined as taking 1 float arg only?

with intel10.1-MSVC8-boost1.35, it links.

rds,
John Reynolds | 1 May 13:38 2008

Filesystem doc bug

I just did an upgrade from 1.33.1 to 1.35.0 and got bit by the BOOST_ALL_DYN_LINK et al macros.

 

Anyways at http://www.boost.org/doc/libs/1_35_0/libs/filesystem/doc/index.htm#Building there is a reference to http://www.boost.org/more/separate_compilation.html explaining the macros, which does not exist. Any idea where this link should be as I am would be curious to read up on these macros.

 

John Reynolds

Aircraft Management Technologies Limited
Registered in
Ireland, No.337561
Registered office: 1 The Green, Malahide,
Co.Dublin, Ireland
Tel: + 353 1 8061000
Fax:+ 353 1 8061025

 

John.Reynolds <at> airmantech.com / John.Reynolds <at> flightman.com
www.airmantech.com / www.flightman.com

 

THE INFORMATION IN THIS E-MAIL IS CONFIDENTIAL AND MAY BE LEGALLY PRIVILEGED.  IT IS INTENDED SOLELY FOR THE ADDRESSEE.  ACCESS TO THIS E-MAIL BY ANYONE ELSE IS UNAUTHORISED.  IF YOU ARE NOT THE INTENDED RECIPIENT, ANY DISCLOSURE, COPYRIGHT, DISTRIBUTION OR ANY ACTION TAKEN OR OMITTED TO BE TAKEN IN RELIANCE ON IT, IS PROHIBITED AND MAY BE UNLAWFUL.

 

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
John Maddock | 1 May 13:52 2008
Picon

Re: Filesystem doc bug

John Reynolds wrote:
> I just did an upgrade from 1.33.1 to 1.35.0 and got bit by the
> BOOST_ALL_DYN_LINK et al macros.
> 
> Anyways at
> http://www.boost.org/doc/libs/1_35_0/libs/filesystem/doc/index.htm#Build
> ing there is a reference to
> http://www.boost.org/more/separate_compilation.html explaining the
> macros, which does not exist. Any idea where this link should be as I
> am 
> would be curious to read up on these macros.

It's at: http://www.boost.org/development/separate_compilation.html,

I've just committed a fix for the Broken link to SVN Trunk BTW.

HTH, John.
Ovanes Markarian | 1 May 13:58 2008

Re: boost::result_of error?

Hicham,

as far as I understand your code you pass to result_of a new type:
typedef typename boost::result_of<floatfct(float, float)>::type resultype;

This type is a pointer to a function type, which has as return type a pointer to floatfct and as params float, float.
That's why it compiles.


Regards,
Ovanes


On Thu, May 1, 2008 at 1:25 PM, Hicham Mouline <hicham <at> mouline.org> wrote:
Hello,
trying out Pete Becker's "c++ std lib ext" exercises,
ex1 p155

#include <iostream>
#include <typeinfo>
#include <boost/utility/result_of.hpp>

typedef float (*floatfct)(float);
int main(int argc, char* argv[])
{
 typedef typename boost::result_of<floatfct(float, float)>::type resultype;
 std::cout<< typeid(resultype).name() << std::endl;
}

should fail, because result_of is instantiated with a callable type with 2 float args,
while it's been defined as taking 1 float arg only?

with intel10.1-MSVC8-boost1.35, it links.

rds,
_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hicham Mouline | 1 May 14:32 2008

Re: boost::result_of error?

But "floatfct" was defined earlier as the type of a pointer to a function with only 1 arg float.
just passing the template argument to result_of creates a new type?
is the new type also called floatfct ?

----- Original Message -----
From: "Ovanes Markarian"
To: boost-users <at> lists.boost.org
Subject: Re: [Boost-users] boost::result_of error?
Date: Thu, 1 May 2008 13:58:21 +0200

Hicham,

as far as I understand your code you pass to result_of a new type:
typedef typename boost::result_of<floatfct(float, float)>::type resultype;

This type is a pointer to a function type, which has as return type a pointer to floatfct and as params float, float.
That's why it compiles.


Regards,
Ovanes


On Thu, May 1, 2008 at 1:25 PM, Hicham Mouline <hicham <at> mouline.org> wrote:
Hello,
trying out Pete Becker's "c++ std lib ext" exercises,
ex1 p155

#include <iostream>
#include <typeinfo>
#include <boost/utility/result_of.hpp>

typedef float (*floatfct)(float);
int main(int argc, char* argv[])
{
 typedef typename boost::result_of<floatfct(float, float)>::type resultype;
 std::cout<< typeid(resultype).name() << std::endl;
}

should fail, because result_of is instantiated with a callable type with 2 float args,
while it's been defined as taking 1 float arg only?

with intel10.1-MSVC8-boost1.35, it links.

rds,
_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Joel FALCOU | 1 May 15:09 2008
Picon
Picon

Preventing unwanted ADL

Hi all,

I'm currently using large parts of booos::mpl and boost::fusion in a 
large project. Alas, I keep triggering some unwanted ADL betwenn some of 
my code and mpl code.

Here is a simplified but significant code that showcases the problem :

#include <iostream>
#include <boost/mpl/vector.hpp>

using namespace std;

namespace bar
{
   namespace foo
   {
     template<class T, class LST> struct some_class
     {
       int size() const { return sizeof(T); }
     };

     template<class T,class LST> static inline
     int size( const some_class<T,LST>& src )
     {
       return src.size();
     }
   }

   using foo::some_class;
   using foo::size;
}

using namespace bar;

int main()
{
   some_class<int,int> f;
   cout << size(f) << endl;

   some_class<int, boost::mpl::vector<int> > g;
   cout << size(g) << endl;
}

This doesn't compile and outputs the following error (using mingw 4.1) :

In function 'int main()':
 > error: 'template<class Sequence> struct boost::mpl::size' is not a 
function
 > error: conflict with 'template<class T, class LST> int 
bar::foo::size(const bar::foo::some_class<T, LST>&)'
 > error:   in call to 'size'

What can I do to prevent this ADL while not forcing the client code to 
explicitely write bar::size(g) ?

Thanks in advance

--

-- 
Joel FALCOU
Research Engineer  <at>  Institut d'Electronique Fondamentale
Université PARIS SUD XI
France
David Sowinski | 1 May 16:26 2008

BOOST & STLport

What needs to be done to get BOOST (1.34.1) and STLport (5.1.5) to correctly coexist with each other under Windows and Visual Studio 2005? I have scoured the web and tried a ton of different configurations, none of which have worked. The problems that I am seeing appear to be related to STLport’s IOStreams vs Microsoft’s IOStreams.

 

Any pointers to successful solutions would be greatly appreciated.


The information in this email or in any file attached hereto is intended only for the personal and confidential use of the individual or entity to which it is addressed and may contain information that is proprietary and confidential. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product. Email transmission cannot be guaranteed to be secure or error-free. P6070214
_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Ovanes Markarian | 1 May 17:13 2008

Re: boost::result_of error?

Hicham,

it does not create a new new type it only declares a type.

Consider the following example:

template<int ()>
struct X
{};


This means your type X expects a function pointer type with return value int and no parameters. This can be used in a meta programming to make some type assumptions or inspection. This is how the result_of works. Think of result_of as of type X but a bit more complex and which can give an assumption about the function type passed. We can write:

template<int ()>
struct X
{
   typedef int        type;
};

A more generic form would be if int would be any valid result type T, so that we could write smth like this:

template<T ()>
struct X
{
   typedef T        type;
};

Actually this is not a legal C++ struct, since T was not declared as template parameter, but think of it as if it would.

template<T MyFunc()>
struct X
{
   typedef T             result_type;
   typedef MyFunc   function_type;
};

Here MyFunc is a name of the function pointer type, which allows us to reference this type from inside the template.


Hope that helps.


With Kinds regards,
Ovanes

On Thu, May 1, 2008 at 2:32 PM, Hicham Mouline <hicham <at> mouline.org> wrote:
But "floatfct" was defined earlier as the type of a pointer to a function with only 1 arg float.
just passing the template argument to result_of creates a new type?
is the new type also called floatfct ?

----- Original Message -----
From: "Ovanes Markarian"
To: boost-users <at> lists.boost.org
Subject: Re: [Boost-users] boost::result_of error?
Date: Thu, 1 May 2008 13:58:21 +0200

Hicham,

as far as I understand your code you pass to result_of a new type:
typedef typename boost::result_of<floatfct(float, float)>::type resultype;

This type is a pointer to a function type, which has as return type a pointer to floatfct and as params float, float.
That's why it compiles.


Regards,
Ovanes


On Thu, May 1, 2008 at 1:25 PM, Hicham Mouline <hicham <at> mouline.org> wrote:
Hello,
trying out Pete Becker's "c++ std lib ext" exercises,
ex1 p155

#include <iostream>
#include <typeinfo>
#include <boost/utility/result_of.hpp>

typedef float (*floatfct)(float);
int main(int argc, char* argv[])
{
 typedef typename boost::result_of<floatfct(float, float)>::type resultype;
 std::cout<< typeid(resultype).name() << std::endl;
}

should fail, because result_of is instantiated with a callable type with 2 float args,
while it's been defined as taking 1 float arg only?

with intel10.1-MSVC8-boost1.35, it links.

rds,
_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Gmane