AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   Vector Issues with GCC (https://forums.alliedmods.net/showthread.php?t=108161)

CrimsonGT 11-02-2009 08:41

Vector Issues with GCC
 
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 11-02-2009 11:44

Re: Vector Issues with GCC
 
Worked fine on GCC-4.1

One day I will learn not to even bother trying to make 4.3 work.

recon0 11-03-2009 20:00

Re: Vector Issues with GCC
 
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.


All times are GMT -4. The time now is 05:28.

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