Actual real FLTK problem now.

Pages: 123
Jul 23, 2019 at 12:36am
Sure, send the errors.

May as well post everything from source to whatever that builds it so we (or I) can easily see what's up.

Well...I have the FLTK 1.10.x...and can get that in any version quickly, so everything else (including what you have of Stroustrup's files - who knows what tiny thing is ajar)
Last edited on Jul 23, 2019 at 12:37am
Jul 23, 2019 at 1:19am
Niccolo,

I'll send the errors ( and then the files that have the errors) and if you want more just let me know and then I'll send that stuff too. ==>

Disregard...… see next post!
Last edited on Jul 23, 2019 at 1:36am
Jul 23, 2019 at 1:20am
Disregard...… see next post.....
Last edited on Jul 23, 2019 at 1:36am
Jul 23, 2019 at 1:20am
Disregard...…. see next post
Last edited on Jul 23, 2019 at 1:36am
Jul 23, 2019 at 1:21am
Disregard..... see next post......
Last edited on Jul 23, 2019 at 1:37am
Jul 23, 2019 at 1:25am
I just remembered you said you have the Stroustup files but I can send them anyways if you like?

Xanadu
Jul 23, 2019 at 1:35am
Niccolo,

I accidentally left the GUI2.h in my project. When I cleared it out the errors reduce to ONLY 22==> Please don't waste your time on all that crap I just posted!!! See the following errors==>

Severity Code Description Project File Line
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 34
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 34
Error C2143 syntax error: missing ';' before '*' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C2238 unexpected token(s) preceding ';' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C2143 syntax error: missing ';' before '*' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C2238 unexpected token(s) preceding ';' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 54
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 67
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 67
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 78
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 78
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 89
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 89
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 106
Error C2061 syntax error: identifier 'Window' Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 106
Error C2065 'win': undeclared identifier Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 108
Error C2228 left of '.attach' must have class/struct/union Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 108
Error C2065 'win': undeclared identifier Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 108
Error C2228 left of '.attach' must have class/struct/union Chapter12_GUI_test c:\program files (x86)\microsoft visual studio 14.0\vc\include\extra\gui.h 108
Error C2440 'return': cannot convert from 'std::ifstream' to 'bool' Chapter12_GUI_test c:\users\*****\documents\visual studio 2015\projects\chapter12_gui_test\chapter12_gui_test\graph.cpp 313
Error C2660 'Graph_lib::Widget::attach': function does not take 1 arguments Chapter12_GUI_test c:\users\*****\documents\visual studio 2015\projects\chapter12_gui_test\chapter12_gui_test\window.cpp 36
Last edited on Jul 23, 2019 at 1:38am
Jul 23, 2019 at 1:54am
Yes, send your compliment of the files as you have them...whatever minor changes may be required I'll see (or see it's missing)....pack up a zip of you can
Last edited on Jul 23, 2019 at 1:55am
Jul 23, 2019 at 2:39am
Niccolo,

I have a zip of all the files as an aggregate to send you..... dumb question..... How do I attach it to the forum so you can see it and download it?

Xanadu
Jul 23, 2019 at 3:31am
Well, unless you have a place on the web to put it (and it can take time), PM me for an email to post it to me.

....oh, that means you'd have to ENABLE PM in this forum for your account, so I can respond.
Last edited on Jul 23, 2019 at 3:32am
Jul 23, 2019 at 10:37am
Done. PM's enabled my friend. Please see message in your account. I love to give options for convenience to everyone.

Xanadu
Last edited on Jul 23, 2019 at 10:41am
Jul 24, 2019 at 4:11pm
Niccolo,

Was the information I sent in the proper form and do you require anything else from me with regards to this issue?

Xanadu
Jul 24, 2019 at 8:11pm
I returned email with the adjustments (mostly order of includes, gui.h must appear before window.h).

Did you get that?
Jul 24, 2019 at 8:15pm
Niccolo,

I understand and when I checked I did NOT receive any files or mail from you.

So that was a negative receipt.

The spam folder was empty and I wouldn't THINK that the mail server would inhibit the file transfer since we're likely talking kbytes for size.

So not sure what happened.

Xanadu
Last edited on Jul 24, 2019 at 8:18pm
Jul 24, 2019 at 8:49pm
@Xanadu4ever, Sorry that failed...eh, email.

Ok, resent - let me know. I had that turned around to you yesterday....worse than phone tag.

....
...File sent merely added a few includes, usually "gui.h" must precede "window.h" - there are dependencies.

There was one function attempting to return an invalid value for the type declared, easily repaired.
Last edited on Jul 25, 2019 at 2:55am
Jul 24, 2019 at 9:48pm
Niccolo,

That last resend was a SUCCESS! You are too kind to actually put that on your site! I will use what yo sent and if there is any problems I suppose I can just grab it again from your page.

So you said minor changes and mainly ORDER of the includes due to the "fragility" issue you had commented about before?

Xanadu
Jul 24, 2019 at 9:53pm
Yes, some dependency between gui.h and window.h required a bit of weeding out, which I dealt with only by adding gui.h were it appeased the compiler.

I suppose a more thorough investigation would reorder the content of these headers. It may be merely a few forward declarations in isolation would be cleaner, but I'm only diving so deep. I figured that if it compiled and functioned, that would move things forward (and likely for anyone else searching for FLTK and finding this).

I do intend to pull that file off the server soon, but I'll give it a day or two.
Jul 24, 2019 at 9:58pm
Very cool page BTW. You do some awesome work with Make a Wish foundation.

Thank you again for all of your help. I'll let you know if I have any issues but I looked through the list and noticed you mainly made changes to Window.h, Window.cpp and Graph.cpp?? Got that right??

If you left comments in there I'll obviously look them over to see what I can learn and figure out regarding what you did and then WHY you did it.....

I'll keep you posted and hopefully this will probably solve my GUI library issues.

respectfully,

Xanadu
Jul 25, 2019 at 12:40am
Niccolo,

I have only 2 errors that are appearing and they are linker errors. They are as follows==>

Severity Code Description Project File Line

Error LNK2001 unresolved external symbol "public: virtual void __thiscall Graph_lib::Button::attach(class Graph_lib::Window &)" (?attach@Button@Graph_lib@@UAEXAAVWindow@2@@Z) Chapter12_GUI_test C:\Users\*****\documents\visual studio 2015\Projects\Chapter12_GUI_test\Chapter12_GUI_test\main.obj 1

Error LNK1120 1 unresolved externals Chapter12_GUI_test C:\Users\*****\documents\visual studio 2015\Projects\Chapter12_GUI_test\Debug\Chapter12_GUI_test.exe 1

The include list and order look like the following:

1
2
3
4
5
6
7
//#include "extra\std_lib_facilities.h"  
//#include "extra\Gui.h"
//#include "extra\Point.h"
//#include "extra\fltk.h"
#include "extra\Simple_window.h"
#include "extra\Graph.h"
#include "extra\Window.h" 


Not sure what is causing the linker errors except that they are the Main.obj and the Main.exe files.

Wow libraries are very unintuitive to install and not easy.

Xanadu
Last edited on Jul 25, 2019 at 1:18am
Jul 25, 2019 at 1:17am
Wow libraries are very unintuitive to install and not easy.


...just wait, boost is in your future :)


I didn't get the linker error, but this is one error (typically, it is quite verbose, the last error is merely an overall re-count of the number of unresolved externals (it says there's 1). So, that's 1 missing function.

The attach function in the button class taking a window as the parameter. See if you can figure out why....this runs over here, as packaged to you.

See if you can find the Button::attach( Window &) definition, notice what file it is in, see if that is factually being linked into your project.

Pages: 123