Raised This Month: $51 Target: $400
 12% 

Vector Issues with GCC


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 11-02-2009 , 08:41   Vector Issues with GCC
Reply With Quote #1

So the project compiles fine under MSVC, but I went to compile it for Linux (which was working fine yesterday) and since adding vectors to the project, I apparently now get these errors. I am hoping someone has a clue as to the cause as I am lost. Im wondering if it might be due to me using gcc/g++ 4.3 but I really dont know.

Code:
In file included from /usr/include/c++/4.3/vector:66,
                 from CGrenadeSpawn.h:37,
                 from extension.cpp:45:
/usr/include/c++/4.3/bits/stl_algobase.h:232:56: error: macro "min" passed 3 arguments, but takes just 2
/usr/include/c++/4.3/bits/stl_algobase.h:252:56: error: macro "max" passed 3 arguments, but takes just 2
In file included from /usr/include/c++/4.3/vector:66,
                 from CGrenadeSpawn.h:37,
                 from extension.cpp:45:
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected unqualified-id before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:188: error: expected initializer before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected unqualified-id before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected `)' before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:210: error: expected initializer before ‘const’
/usr/include/c++/4.3/bits/stl_algobase.h:232: error: function definition does not declare parameters
/usr/include/c++/4.3/bits/stl_algobase.h:252: error: function definition does not declare parameters
/usr/include/c++/4.3/bits/stl_algobase.h: In static member function ‘static bool std::__lexicographical_compare<true>::__lc(const _Tp*, const _Tp*, const _Up*, const _Up*)’:
/usr/include/c++/4.3/bits/stl_algobase.h:904: error: expected unqualified-id before ‘(’ token
In file included from /usr/include/c++/4.3/vector:70,
                 from CGrenadeSpawn.h:37,
                 from extension.cpp:45:
/usr/include/c++/4.3/bits/stl_vector.h: In member function ‘size_t std::vector<_Tp, _Alloc>::_M_check_len(size_t, const char*) const’:
/usr/include/c++/4.3/bits/stl_vector.h:1080: error: expected unqualified-id before ‘(’ token
In file included from /usr/include/c++/4.3/vector:71,
                 from CGrenadeSpawn.h:37,
                 from extension.cpp:45:
/usr/include/c++/4.3/bits/stl_bvector.h: In member function ‘size_t std::vector<bool, _Alloc>::_M_check_len(size_t, const char*) const’:
/usr/include/c++/4.3/bits/stl_bvector.h:991: error: expected unqualified-id before ‘(’ token
make[1]: *** [Release.orangebox/extension.o] Error 1
make[1]: Leaving directory `/home/brett/sourcemm/TF2Ext'
make: *** [all] Error 2
brett@brett-desktop:~/sourcemm/TF2Ext$
__________________
CrimsonGT is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 11-02-2009 , 11:44   Re: Vector Issues with GCC
Reply With Quote #2

Worked fine on GCC-4.1

One day I will learn not to even bother trying to make 4.3 work.
__________________
CrimsonGT is offline
recon0
Veteran Member
Join Date: Sep 2007
Location: US
Old 11-03-2009 , 20:00   Re: Vector Issues with GCC
Reply With Quote #3

It looks like some macros were changed
Code:
/usr/include/c++/4.3/bits/stl_algobase.h:232:56: error: macro "min" passed 3 arguments, but takes just 2 
/usr/include/c++/4.3/bits/stl_algobase.h:252:56: error: macro "max" passed 3 arguments, but takes just 2 
In file included from /usr/include/c++/4.3/vector:66, from CGrenadeSpawn.h:37, from extension.cpp:45:
and the vector code wasn't updated to use the new macro versions.

I have a feeling once those errors are fixed, the others will probably go away.
__________________
recon0 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode