Pointing Xcode to a C++ template


Carl Hoefs
 

I have a working C++ Xcode 11.1 project on Mojave. I've copied it over to a Catalina system, but Xcode 11.5 won't build it ("can't locate the C++ template named 'deque'").

On both Mojave and Catalina the deque template resides here:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque

How can I get Xcode/Catalina to reference this? Is there a project setting I'm overlooking?

-Carl


Glenn L. Austin
 

Namespace?

It would normally be "std::deque"

-- 
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austinsoft.com>

On Oct 19, 2020, at 7:50 PM, Carl Hoefs <newslists@...> wrote:

I have a working C++ Xcode 11.1 project on Mojave. I've copied it over to a Catalina system, but Xcode 11.5 won't build it ("can't locate the C++ template named 'deque'").

On both Mojave and Catalina the deque template resides here:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque

How can I get Xcode/Catalina to reference this? Is there a project setting I'm overlooking?

-Carl








Roland King
 

how are you importing it in the file which is failing?

On 2020-10-20 10:50, Carl Hoefs wrote:
I have a working C++ Xcode 11.1 project on Mojave. I've copied it over
to a Catalina system, but Xcode 11.5 won't build it ("can't locate the
C++ template named 'deque'").
On both Mojave and Catalina the deque template resides here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque
How can I get Xcode/Catalina to reference this? Is there a project
setting I'm overlooking?
-Carl


Carl Hoefs
 

I'm referencing it as std::deque

What import is required? It builds verbatim on Mojave but not Catalina...

-Carl

On Oct 19, 2020, at 8:18 PM, rols@rols.org wrote:

how are you importing it in the file which is failing?

On 2020-10-20 10:50, Carl Hoefs wrote:
I have a working C++ Xcode 11.1 project on Mojave. I've copied it over
to a Catalina system, but Xcode 11.5 won't build it ("can't locate the
C++ template named 'deque'").
On both Mojave and Catalina the deque template resides here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque
How can I get Xcode/Catalina to reference this? Is there a project
setting I'm overlooking?
-Carl


Glenn L. Austin
 

#include <deque>

-- 
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austinsoft.com>

On Oct 19, 2020, at 8:21 PM, Carl Hoefs <newslists@...> wrote:

I'm referencing it as std::deque

What import is required? It builds verbatim on Mojave but not Catalina...

-Carl


On Oct 19, 2020, at 8:18 PM, rols@... wrote:

how are you importing it in the file which is failing?

On 2020-10-20 10:50, Carl Hoefs wrote:
I have a working C++ Xcode 11.1 project on Mojave. I've copied it over
to a Catalina system, but Xcode 11.5 won't build it ("can't locate the
C++ template named 'deque'").
On both Mojave and Catalina the deque template resides here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque
How can I get Xcode/Catalina to reference this? Is there a project
setting I'm overlooking?
-Carl






Carl Hoefs
 

Yes, that stifles the cry. But why it's needed on one system and not the other is beyond me...

Thx,
-Carl


On Oct 19, 2020, at 8:24 PM, Glenn L. Austin <glenn@...> wrote:

#include <deque>

-- 
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austinsoft.com>

On Oct 19, 2020, at 8:21 PM, Carl Hoefs <newslists@...> wrote:

I'm referencing it as std::deque

What import is required? It builds verbatim on Mojave but not Catalina...

-Carl


On Oct 19, 2020, at 8:18 PM, rols@... wrote:

how are you importing it in the file which is failing?

On 2020-10-20 10:50, Carl Hoefs wrote:
I have a working C++ Xcode 11.1 project on Mojave. I've copied it over
to a Catalina system, but Xcode 11.5 won't build it ("can't locate the
C++ template named 'deque'").
On both Mojave and Catalina the deque template resides here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque
How can I get Xcode/Catalina to reference this? Is there a project
setting I'm overlooking?
-Carl







Roland King
 

because you got lucky before and it just happened that something recursively included picked up dequeue for you

you should always include the headers for classes you're using in your file, regrettably you tend only to find this out on days like today when it fails. 

 


On 2020-10-20 11:27, Carl Hoefs wrote:

Yes, that stifles the cry. But why it's needed on one system and not the other is beyond me...
 
Thx,
-Carl


On Oct 19, 2020, at 8:24 PM, Glenn L. Austin <glenn@...> wrote:

#include <deque>

-- 
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austinsoft.com>

On Oct 19, 2020, at 8:21 PM, Carl Hoefs <newslists@...> wrote:

I'm referencing it as std::deque

What import is required? It builds verbatim on Mojave but not Catalina...

-Carl


On Oct 19, 2020, at 8:18 PM, rols@... wrote:

how are you importing it in the file which is failing?

On 2020-10-20 10:50, Carl Hoefs wrote:
I have a working C++ Xcode 11.1 project on Mojave. I've copied it over
to a Catalina system, but Xcode 11.5 won't build it ("can't locate the
C++ template named 'deque'").
On both Mojave and Catalina the deque template resides here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/deque
How can I get Xcode/Catalina to reference this? Is there a project
setting I'm overlooking?
-Carl