Zobrazit předchozí téma :: Zobrazit následující téma |
Autor |
Zpráva |
nou

Založen: 28. 07. 2007 Příspěvky: 1051
|
Zaslal: 26. říjen 2010, 09:45:01 Předmět: |
|
|
pokial pise len warningi tak je to v pohode. ale ajt k by som ti odporucil skusit to s tymi predkopilovanymi lib pre visualko. myslim ze by si mal menej trapenia. _________________ Najjednoduchšie chyby sa najtažšie hľadajú. |
|
Návrat nahoru |
|
 |
pichlik
Založen: 25. 10. 2010 Příspěvky: 10
|
Zaslal: 2. listopad 2010, 19:09:31 Předmět: |
|
|
Tak jsem na devpaks.org ziskal balicek s boostem "boost-1.39.0.DevPackage" ten jsem si rozbalil a soubory nakopiroval do adresaru lib a include kam davam i ostatni knihovny a hlavickove soubory, pokusil jsem se prelozit ukazkovy priklad z boost.org
kód: |
// file_size program -------------------------------------------------------//
// Copyright Beman Dawes, 2004
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/filesystem for documentation.
#include <boost/filesystem/operations.hpp>
#include <iostream>
namespace fs = boost::filesystem;
int main( int argc, char* argv[] )
{
if ( argc != 2 )
{
std::cout << "Usage: file_size path\n";
return 1;
}
std::cout << "sizeof(intmax_t) is " << sizeof(boost::intmax_t) << '\n';
fs::path p( argv[1], fs::native );
if ( !fs::exists( p ) )
{
std::cout << "not found: " << argv[1] << std::endl;
return 1;
}
if ( !fs::is_regular( p ) )
{
std::cout << "not a regular file: " << argv[1] << std::endl;
return 1;
}
std::cout << "size of " << argv[1] << " is " << fs::file_size( p )
<< std::endl;
return 0;
}
|
priklad jsem kompiloval s "-lboost_filesystem" ,ale dostavam hlaseni
kód: |
ld.exe||cannot find -lboost_filesystem| |
|
|
Návrat nahoru |
|
 |
nou

Založen: 28. 07. 2007 Příspěvky: 1051
|
Zaslal: 2. listopad 2010, 20:26:05 Předmět: |
|
|
teraz si uz poriadne nespominam ale skus plne meno lib. libboost_filesystem.lib _________________ Najjednoduchšie chyby sa najtažšie hľadajú. |
|
Návrat nahoru |
|
 |
pichlik
Založen: 25. 10. 2010 Příspěvky: 10
|
Zaslal: 3. listopad 2010, 07:38:26 Předmět: |
|
|
pokud prilinkuji cely nazev knihovny "libboost_filesystem.lib" tak to sice neda hlaseni ze by ji to nemohlo prilinkovat, ale hodi to nasledujici errory
kód: |
||=== boos, Debug ===|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|657|error: 'system' is not a class or namespace|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|657|error: expected '{' before 'system_error'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|658|error: invalid type in declaration before '{' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|658|error: template declaration of 'int boost::filesystem::system_error'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|660|error: expected primary-expression before 'public'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|660|error: expected '}' before 'public'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|666|error: 'system' is not a class or namespace|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|666|error: expected ',' or '...' before 'ec'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|666|error: expected constructor, destructor, or type conversion before ';' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|669|error: expected ',' or '...' before '&' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|669|error: expected constructor, destructor, or type conversion before ';' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|671|error: expected ',' or '...' before '&' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|672|error: expected constructor, destructor, or type conversion before ';' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|674|error: expected class-name before '(' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|676|error: expected initializer before '&' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|681|error: expected initializer before '&' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|687|error: non-member function 'const char* boost::filesystem::what()' cannot have cv-qualifier|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp||In function 'const char* boost::filesystem::what()':|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|689|error: 'm_imp_ptr' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|690|error: 'system' is not a class or namespace|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|691|error: 'system' is not a class or namespace|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|691|error: 'm_imp_ptr' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|695|error: expected unqualified-id before 'private'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|702|error: 'm_imp' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|702|error: template argument 1 is invalid|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|702|error: invalid type in declaration before ';' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|705|error: expected initializer before '<' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|708|error: expected initializer before '<' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp||In function 'bool boost::detail::is_separator(typename Path::string_type::value_type)':|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|732|error: 'slash' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|732|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|732|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|734|error: 'path_alt_separator' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|734|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|734|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp||In function 'typename String::size_type boost::detail::filename_pos(const String&, typename String::size_type)':|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|752|error: 'slash' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|752|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|752|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|753|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|753|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|756|error: 'slash' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|756|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|756|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|761|error: 'slash' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|761|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|761|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|764|error: 'path_alt_separator' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|764|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|764|error: '::value' has not been declared|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|766|error: 'colon' was not declared in this scope|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|766|error: expected primary-expression before '>' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\boost\filesystem\path.hpp|766|error: '::value' has not been declared|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
|
|
|
Návrat nahoru |
|
 |
pcmaster

Založen: 28. 07. 2007 Příspěvky: 1827
|
Zaslal: 4. listopad 2010, 14:10:18 Předmět: |
|
|
To su ale errory kompilatora, nie linkera V tom .lib je uz skompilovany kod, aby bolo jasne. Takze mas problem niekde v includoch. _________________ Off-topic flame-war addict since the very beginning. Registered since Oct. 2003!
Interproductum fimi omne est. |
|
Návrat nahoru |
|
 |
Quiark

Založen: 29. 07. 2007 Příspěvky: 816 Bydliště: Chlívek 401
|
|
Návrat nahoru |
|
 |
pichlik
Založen: 25. 10. 2010 Příspěvky: 10
|
Zaslal: 4. listopad 2010, 19:48:42 Předmět: |
|
|
Diky za odkaz, precetl jsem si to ale nejak to stale nemohu rozlousknout |
|
Návrat nahoru |
|
 |
|