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 » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Bug in Lang.h or weird design error in TheIDE?!
Bug in Lang.h or weird design error in TheIDE?! [message #13185] Wed, 19 December 2007 16:59 Go to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
Currently I am using MS VC9 on WinXP.

I exported the tutorial application Draw03 into my MyApps folder and tried to build it. While Draw03 builds without any problems in the tutorial assembly, trying to build it in the MyApps folder yields

Quote:

...Core/Lang.h(108) : fatal error C1083: Cannot open include file: 'Lang_s.h': No such file or directory


although this file exists in the Core directory. A quick look into the sources reveals that Lang_s.h which is included via Lang.h by

// #include "Lang_s.h"
#include "Lang_s.h"


doesn't show up neither in the file list on TheIDE's left side nor in Core.upp (which is obviously related) - but furthermore:

*** It is even not possible to find Lang_s.h using "Find files" nor (knowing that it does exist) to insert it using "Insert package directory file(s)". ***

*** It even looks as if TheIDE ist not capable to properly handle file names containing an underscore ("_"). But this should definitely be possible as Ultimate++ does have files with names of this kind (and these file names are legal!). ***

What now?

Werner

UPDATE:

Further investigation yields:

1.
The problem arises in debug mode (using BLITZ).

2.
The problem does not "normally" arise in any release mode (not using BLITZ).

3.
Cleaning the package (and UPPOUT) makes the problem arise even in (any) release mode.

W.

[Updated on: Wed, 19 December 2007 17:54]

Report message to a moderator

Re: Bug in Lang.h or weird design error in TheIDE?! [message #13187 is a reply to message #13185] Wed, 19 December 2007 18:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, there is a reason for this weird issues.

Lang_s.h contains definition of "s_" macro used for translation. Anyway, during "sync translation files", TheIDE scans all packages files for all s_ appearances - which would include even #define s_ itself. That is why it is kept "outside".

Find files really only finds files in packages.

Anyway, obviously, "export" feature does not work well here. OTOH, you do not even need it in this case, you only wanted to copy Draw03 - simply copy the "Draw03" directory, that is all you need.

There is no magic in package, every package is fully contained in its directory, there is no "external knowlegde" about it. TheIDE simply scans nests of assembly to gather the list of active packages... The only thing that has to be correct is that package description is stored in .upp file and its name has to match the name of package.

Mirek
Re: Bug in Lang.h or weird design error in TheIDE?! [message #13190 is a reply to message #13187] Wed, 19 December 2007 19:09 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Wed, 19 December 2007 18:12

OTOH, you do not even need it in this case, you only wanted to copy Draw03 - simply copy the "Draw03" directory, that is all you need.

Mirek


Doesn't work for me. Copying results in the same error.

Werner

Re: Bug in Lang.h or weird design error in TheIDE?! [message #13193 is a reply to message #13190] Thu, 20 December 2007 05:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Have you deleted "Core" from MyApps?

Mirek
Re: Bug in Lang.h or weird design error in TheIDE?! [message #13200 is a reply to message #13193] Thu, 20 December 2007 15:23 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Thu, 20 December 2007 05:44

Have you deleted "Core" from MyApps?

Mirek


No, I have not. It still exists in the assembly MyApps, too. (By the way: does it really have to? After all MyApps contains the nest uppsrc and this includes Core.)

To clarify the situation, I have now:

1.
copied the content of Draw03's main.cpp

2.
created a new Draw03Test package in MyApps (using "New package" and "<empty>")

3.
created a new file main.cpp in Draw03Test

4.
pasted the content of Draw03's main.cpp into the new main.cpp

5.
added the CtrlLib package

6.
set up "GUI"

7.
built the new package (Debug, Release(s))

I am still getting the same error, namely

Quote:

...Core/Lang.h(107) : fatal error C1083: Cannot open include file: 'Lang_s.h': No such file or directory


Werner
Re: Bug in Lang.h or weird design error in TheIDE?! [message #13201 is a reply to message #13200] Thu, 20 December 2007 15:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Werner wrote on Thu, 20 December 2007 09:23

luzr wrote on Thu, 20 December 2007 05:44

Have you deleted "Core" from MyApps?

Mirek


No, I have not. It still exists in the assembly MyApps, too. (By the way: does it really have to? After all MyApps contains the nest uppsrc and this includes Core.)

To clarify the situation, I have now:

1.
copied the content of Draw03's main.cpp

2.
created a new Draw03Test package in MyApps (using "New package" and "<empty>")

3.
created a new file main.cpp in Draw03Test

4.
pasted the content of Draw03's main.cpp into the new main.cpp

5.
added the CtrlLib package

6.
set up "GUI"

7.
built the new package (Debug, Release(s))

I am still getting the same error, namely

Quote:

...Core/Lang.h(107) : fatal error C1083: Cannot open include file: 'Lang_s.h': No such file or directory


Werner



Sure, that is easily explainable. TheIDE uses the Core from MyApps, which is broken.

That is the principle of assemblies - if on package requires another, assembly nests are scanned from the left. So in this case, scan starts in MyApps, then goes to uppsrc. Note that such scenario allows you to e.g. develop "experimental" Core, while keeping original uppsrc packages.

Sorry for confusing you by that "export" feature, it was intended for another purpose...

Mirek
Re: Bug in Lang.h or weird design error in TheIDE?! [message #13207 is a reply to message #13201] Thu, 20 December 2007 21:04 Go to previous messageGo to next message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
luzr wrote on Thu, 20 December 2007 15:47

Sure, that is easily explainable. TheIDE uses the Core from MyApps, which is broken.

That is the principle of assemblies - if on package requires another, assembly nests are scanned from the left. So in this case, scan starts in MyApps, then goes to uppsrc. Note that such scenario allows you to e.g. develop "experimental" Core, while keeping original uppsrc packages.

Sorry for confusing you by that "export" feature, it was intended for another purpose...

Mirek


Deleting all the ex- and reimported "base" packages in MyApps did the job!

Thank you very much for your explanation. I think I understand now. Unfortunately I haven't found this issue in the documentation.

But there are still 2 questions:

1.
What other purpose is / was "Export" intended for?

2.
What about the "Find file with underscore" issue?

There are a lot of files in uppsrc which contain underscores - headers and sources. If I ignore the header files, there remain 4 source files. 1 is found by "Find file", the other 3 not, namely:

OL_Set.cpp in Core: yes
util_td.cpp in Sql: no
path_aux.cpp in Geom\Draw: no
calc_idl.cpp in Ole\Ctrl\Calc: no

Does that make sense and, if so, what sense?

Werner
Re: Bug in Lang.h or weird design error in TheIDE?! [message #13208 is a reply to message #13207] Fri, 21 December 2007 11:35 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Werner wrote on Thu, 20 December 2007 15:04


But there are still 2 questions:

1.
What other purpose is / was "Export" intended for?



Frankly: I am not quite sure... It was added years ago for some special purpose and nobody ever cared to remove it or improve it....

Quote:


2.
What about the "Find file with underscore" issue?



It works. However, the function only scans package infos, not directories.

Mirek
Previous Topic: Finnish translations for 711-dev2
Next Topic: TheIDE i18n - export .tr f
Goto Forum:
  


Current Time: Thu Mar 28 20:05:16 CET 2024

Total time taken to generate the page: 0.01465 seconds