Not compiling on windows (r1063)

This particular forum is archives, bug reports should be made at https://github.com/visualboyadvance-m/v ... e-m/issues


Post Reply
khh
Junior Member
Posts: 2
Joined: Tue Jan 03, 2012 12:51 pm

Not compiling on windows (r1063)

Post by khh »

I just checked out a fresh version of this project (r1063), and it seems to me there are a few problems.

Building on Windows XP and Windows 7 x86 platforms, both with Visual Studio 2010 Professional.

 

 

Problem: file /dependencies/SubWCRev.exe redundant

  • Current SubWCRev.exe is x64 (problems for x86 users)

  • Will cause problem due to svn 1.6 and svn 1.7 being incompatable

  • Depends on a tortoisesvn DLL, meaning user will need to have the full program installed anyhow

Solution: Delete it and execute SubWCRev.exe from PATH; list tortoisesvn as a dependency in /trunk/doc/DevInfo.txt. (I believe tortoisesvn adds its binary directory to PATH automatically)

(PS: the standalone version of SubWCRev.exe appears to have been discontinued)

 

 

Problem: GBA Link feature code not well-written for Windows, it seems

<ol style="list-style-type:decimal;">[*]
/trunk/src/gba/GBALink.h: Uses sf::Thread which isn't included in /dependencies/SMFL/

[*]
/trunk/src/gba/GBALink.cpp: Uses WIN32 macro, which isn't set by MSVC

[*]
/trunk/src/gba/GBALink.cpp: Uses usleep() which isn't defined on Windows

[*]
/trunk/src/gba/LinkOptions.cpp: Innumerable errors

</ol>

The problems in GBALink.cpp can be easily fixed (patch). I'm not sure how GBALink.h should be fixed, but it should be trivial for someone familiar with the code. (I just copied the sfml_system files into the dependencies directory to shut it up).

 

However it will still not compile, producing this output when I try.

Code: Select all

1>------ Build started: Project: VisualBoyAdvance-M, Configuration: Release Win32 ------
1>Build started 04.01.2012 19:59:05.
1>InitializeBuildStatus:
1>  Touching "D:\dev\vbam\trunk\project\vs2010_mfc\Win32\Release_temp\VisualBoyAdvance-M.unsuccessfulbuild".
1>PreBuildEvent:
1>  SubWCRev: 'D:\dev\vbam\trunk'
1>  Last committed at revision 1062
1>  Updated to revision 1063
1>  Local modifications found
1>_NASM:
1>Skipping target "_NASM" because all output files are up-to-date with respect to the input files.
1>ClCompile:
1>  All outputs are up-to-date.
1>  LinkOptions.cpp
1>  VBA.cpp
1>..\..\src\win32\LinkOptions.cpp(497): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(497): error C2232: '->ServerWait::m_serveraddress' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(497): error C2228: left of '.Format' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(497): error C3867: 'sf::IPAddress::ToString': function call missing argument list; use '&sf::IPAddress::ToString' to create a pointer to member
1>..\..\src\win32\LinkOptions.cpp(500): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(500): error C2232: '->ServerWait::m_plconn' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(500): error C2065: 'i' : undeclared identifier
1>..\..\src\win32\LinkOptions.cpp(500): error C2228: left of '.Format' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(501): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(501): error C2232: '->CWnd::UpdateData' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(503): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(503): error C2232: '->ServerWait::m_prgctrl' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(503): error C2228: left of '.StepIt' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(506): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(506): error C2232: '->CWnd::SendMessageA' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(525): error C2248: 'Win32ServerInfoDisplay::Win32ServerInfoDisplay' : cannot access private member declared in class 'Win32ServerInfoDisplay'
1>          ..\..\src\win32\LinkOptions.cpp(495) : see declaration of 'Win32ServerInfoDisplay::Win32ServerInfoDisplay'
1>          ..\..\src\win32\LinkOptions.cpp(493) : see declaration of 'Win32ServerInfoDisplay'
1>..\..\src\win32\LinkOptions.cpp(568): error C2628: 'Win32ClientInfoDisplay' followed by 'void' is illegal (did you forget a ';'?)
1>..\..\src\win32\LinkOptions.cpp(569): error C2556: 'Win32ClientInfoDisplay LinkClient::OnLinkConnect(void)' : overloaded function differs only by return type from 'void LinkClient::OnLinkConnect(void)'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(178) : see declaration of 'LinkClient::OnLinkConnect'
1>..\..\src\win32\LinkOptions.cpp(569): error C2371: 'LinkClient::OnLinkConnect' : redefinition; different basic types
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(178) : see declaration of 'LinkClient::OnLinkConnect'
1>..\..\src\win32\LinkOptions.cpp(582): error C2248: 'Win32ClientInfoDisplay::Win32ClientInfoDisplay' : cannot access private member declared in class 'Win32ClientInfoDisplay'
1>          ..\..\src\win32\LinkOptions.cpp(550) : see declaration of 'Win32ClientInfoDisplay::Win32ClientInfoDisplay'
1>          ..\..\src\win32\LinkOptions.cpp(548) : see declaration of 'Win32ClientInfoDisplay'
1>..\..\src\win32\LinkOptions.cpp(552): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(552): error C2232: '->CWnd::SetWindowTextA' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(555): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(555): error C2232: '->ServerWait::m_serveraddress' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(555): error C2228: left of '.Format' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(556): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(556): error C2232: '->ServerWait::m_plconn' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(556): error C2228: left of '.Format' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(557): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(557): error C2232: '->ServerWait::m_plconn' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(557): error C2228: left of '.Format' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(559): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(559): error C2232: '->ServerWait::m_prgctrl' : left operand has 'class' type, use '.'
1>..\..\src\win32\LinkOptions.cpp(559): error C2228: left of '.StepIt' must have class/struct/union
1>..\..\src\win32\LinkOptions.cpp(562): error C2819: type 'ServerWait' does not have an overloaded member 'operator ->'
1>          d:\dev\vbam\trunk\src\win32\LinkOptions.h(187) : see declaration of 'ServerWait'
1>          did you intend to use '.' instead?
1>..\..\src\win32\LinkOptions.cpp(562): error C2232: '->CWnd::SendMessageA' : left operand has 'class' type, use '.'
1>..\..\src\win32\VBA.cpp(114): error C2556: 'int InitLink(void)' : overloaded function differs only by return type from 'bool InitLink(void)'
1>          d:\dev\vbam\trunk\src\win32\../gba/GBALink.h(154) : see declaration of 'InitLink'
1>..\..\src\win32\VBA.cpp(114): error C2371: 'InitLink' : redefinition; different basic types
1>          d:\dev\vbam\trunk\src\win32\../gba/GBALink.h(154) : see declaration of 'InitLink'
1>..\..\src\win32\VBA.cpp(448): warning C4551: function call missing argument list
1>..\..\src\win32\VBA.cpp(448): error C3861: 'InitLink': identifier not found
1>..\..\src\win32\VBA.cpp(1564): warning C4800: 'DWORD' : forcing value to bool 'true' or 'false' (performance warning)
1>..\..\src\win32\VBA.cpp(1568): warning C4800: 'DWORD' : forcing value to bool 'true' or 'false' (performance warning)
1>..\..\src\win32\VBA.cpp(2348): error C2440: 'return' : cannot convert from 'void *' to 'HMODULE'
1>          Conversion from 'void*' to pointer to non-'void' requires an explicit cast
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:08.98
========== Build: 0 succeeded, 1 failed, 4 up-to-date, 0 skipped ==========

(full output here)

 

Am I doing it wrong, or is the link feature in need of some clean-up and fixes?

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

Not compiling on windows (r1063)

Post by Squall Leonhart »

Trunk is very wip, new linking code should be incoming eventually when/if adamn returns, and it needs some MSVC cleanups yes.

 

the branch/prewx was before wx was added and any non wx patches that land to trunk also land on the branch to keep core consistency

khh
Junior Member
Posts: 2
Joined: Tue Jan 03, 2012 12:51 pm

Not compiling on windows (r1063)

Post by khh »

Oh thanks, that branch compiles.

 

One thing I noticed, though, it references the fex project in the wrong location. (Patch for MSVC 2010 project)

 

edit: Oh, looking at the log I noticed it's supposed to reference the fex in dependencies, in which case it's the solution file that needs updating. (patch)

Last edited by khh on Thu Jan 05, 2012 9:04 am, edited 1 time in total.
Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

Not compiling on windows (r1063)

Post by Squall Leonhart »

hmmm, the silly vcxproj's didn't update when we moved fex back into trunk

 

fixed

Universal
Junior Member
Posts: 42
Joined: Sun Oct 24, 2010 1:01 pm

Not compiling on windows (r1063)

Post by Universal »

From what I can tell, sf::Thread is calling for the Thread.hpp which is found under SFML\include\SFML\system with the standard SFML SDK. So far I've tried copying the files to the SFML directory, the VC includes directory, and tried modifying the properties of this project to include these files, but have gotten nowhere.

 

It would appear that the SFML_Network Dependancy would need to be changed to include a bit more.

 

At least I figured out what is missing, now I just have to figure out how to get it included into the source code to allow it to compile without problems.

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

Not compiling on windows (r1063)

Post by Squall Leonhart »

sf::Thread isn't required at all by MFC, so its something Wx added for some reason while being entirely useless.

Universal
Junior Member
Posts: 42
Joined: Sun Oct 24, 2010 1:01 pm

Not compiling on windows (r1063)

Post by Universal »

After looking the code over, I discovered how to fix the SF::Thread dependancy by going into dependancies/SFML/include/SFML/System.hpp and uncommenting

#include

This will require adding into the system folder Thread.hpp as well as the folder Win32, which will contain another copy of Thread.hpp for Windows.

 

Now to work on the LinkOption.cpp file.

Last edited by Universal on Sun Jan 15, 2012 12:54 pm, edited 1 time in total.
Post Reply