Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » [SOLVED] Added my own .h file, struggling to use the String type (After moving some code into my own translation unit, I can't seem to #include <String> correctly)
[SOLVED] Added my own .h file, struggling to use the String type [message #52533] Sun, 20 October 2019 22:35 Go to previous message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Member
Dear everyone,

this looks like a noob issue...
I've created something simple in U++, using TheIDE and MinGW as a compiler. As long as I use the String type in the project's main translation unit, I'm fine.
At some point down the road, I've moved some of my code into a new .cpp file and a new .h file in the same project and directory. Trying to create a separate translation unit - a local library if you will. If I #include <String>, I'm getting "error: 'String' does not name a type" . I've tried putting "using namespace Upp;" on top of the file, I've tried qualifying the String in variable declarations as Upp::String... none of that helps (the compiler even says that the Upp namespace doesn't exist). I'm not very fluent in the namespaces and this is probably something pretty simple... Any help would be welcome.

Actually I've just found out that if I #include <Core/String.h>, I get rid of the "String undeclared" error message, but instead I get a waterfall of complaints about WChar, 'byte' and 'force_inline' etc. not being declared (messages coming from String.h). I'm puzzled... Is there some upper-level header file that I should #include in the first place?

Frank Rysanek

[Updated on: Fri, 25 October 2019 07:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Questions on the editor and hotkeys. And yet.
Next Topic: [solved] U++ TheIDE integrated debugging tutorial ?
Goto Forum:
  


Current Time: Thu Mar 28 23:26:49 CET 2024

Total time taken to generate the page: 0.00929 seconds