magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
2.04k stars 151 forks source link

Problem User #2 again, this time compiling fails under XP with BCPP 5.0 and TASM 5.0 #23

Closed Maxwelldoug closed 4 years ago

Maxwelldoug commented 4 years ago

log2.txt I've attached the log from the get-go this time. thank you for recommending XP, I finally have guest additions.

magiblot commented 4 years ago

NOTE: Exited with message stating that TASM doesn't exist, but it is definitely installed.

If it is installed, then make sure that:

Maxwelldoug commented 4 years ago

thanks, somehow missed that step. trying again now.

Maxwelldoug commented 4 years ago

Nope, same issue, 100% in PATH.

Maxwelldoug commented 4 years ago

TASM, TASM32, TASMX all present in the relevant folder.

magiblot commented 4 years ago

But are you able to call them from the command line?

Maxwelldoug commented 4 years ago

oh for- no it isn't. I'm not crazy, it's definitely in path.

magiblot commented 4 years ago

Maybe you need to open a new console? Or there is a spelling mistake in PATH?

Maxwelldoug commented 4 years ago

nope, literally copy/pasted the directory in the same format as BCPP then restarted the VM. BCCP's excecutables work fine. That is very odd.

magiblot commented 4 years ago

How are you setting the PATH variable?

Maxwelldoug commented 4 years ago

control panel- System- advanced- Environment Variables- select path- edit- add the directory followed by a semicolon, save, exit, reboot

magiblot commented 4 years ago

Yes, that's the intended way to do it. So what do you see if you run echo %PATH% in the command line? Does it match what you set in the control panel?

Maxwelldoug commented 4 years ago

that's an affirmative. however, for some reason, there's a space where there shouldn't be, which I didn't add and would explain the issue. let's try this again.

magiblot commented 4 years ago

It could also be a non-printable character. These things happen often.

Maxwelldoug commented 4 years ago

awesome, TV.lib generated, but there are still feckin errors, FFS.

Maxwelldoug commented 4 years ago

geninc32 still not present as well.

magiblot commented 4 years ago

Can you please generate the logs this way?

make > out.txt 2> err.txt
Maxwelldoug commented 4 years ago

out.txt

err.txt is empty and git won't take it.

magiblot commented 4 years ago
Error calendar.cpp 140: Illegal structure operation in function TCalendarView::draw()
Error calendar.cpp 160: Illegal structure operation in function TCalendarView::draw()

This is a compilation error. It's rejecting the following lines in examples/tvdemo/calendar.cpp:

    ostrstream( str, sizeof str)
      << setw(9) << monthNames[month] << " " << setw(4) << year // <-- this one
      << " " << (char) 30 << "  " << (char) 31 << " " << ends;
                ostrstream( str, sizeof str )
                  << setw(2) << (int) current << ends; // <-- and this one

I have no idea why it fails, but I guess you can just comment them out.

Maxwelldoug commented 4 years ago

that second thing you mentioned isn't even in the file.

Maxwelldoug commented 4 years ago

nope, ignore that, just ctrl+f being bad

Maxwelldoug commented 4 years ago

out2.txt err empty once again, still error'd.

magiblot commented 4 years ago
Error calendar.cpp 161: Statement missing ; in function TCalendarView::draw()
Error calendar.cpp 163: Misplaced else in function TCalendarView::draw()

Are you familiar with C++?

magiblot commented 4 years ago

On line 160 you cannot just comment out the whole line. You need to leave a semicolon at the end of the statement.

Maxwelldoug commented 4 years ago

depends what you mean. I do quite a bit of work in C++, but I build code for nintendo consoles with entirely different instructions sets.

https://github.com/devkitPro/nds-examples/blob/master/hello_world/source/main.cpp this is what helloworld looks like on the DS.

Maxwelldoug commented 4 years ago

I'm better at stringing code snippets from stackexchange articles together then writing my own TBH.

magiblot commented 4 years ago

Also, is there a specific reason why you are using Borland C++ 5.02 instead of 4.52?

Maxwelldoug commented 4 years ago

mainly because it's a newer piece of software and the one my father owns a copy of :P

magiblot commented 4 years ago

I think I know why it fails. Can you try with the following changes?

Near line 140:

-    ostrstream( str, sizeof str)
-      << setw(9) << monthNames[month] << " " << setw(4) << year
-      << " " << (char) 30 << "  " << (char) 31 << " " << ends;
+        {
+        ostrstream os( str, sizeof str);
+        os << setw(9) << monthNames[month] << " " << setw(4) << year
+           << " " << (char) 30 << "  " << (char) 31 << " " << ends;
+        }

Near line 160:

-                ostrstream( str, sizeof str )
-                  << setw(2) << (int) current << ends;
+                    {
+                    ostrstream os( str, sizeof str );
+                    os << setw(2) << (int) current << ends;
+                    }

EDIT: I had made a mistake, it's now fixed.

Maxwelldoug commented 4 years ago

Alright, that seems good... no error messages anywhere in the log. thanks for the help! I'll request my friend's sample code and get back to you if anything else breaks.