Views: 6,701,159 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 03-28-24 10:37 PM
Guest:

0 users reading Compilation errors on Windows | 2 bots

Main - General - Compilation errors on Windows Hide post layouts | New reply


SIGMA
Posted on 10-15-18 12:10 AM Link | #675
I am having some compilation errors when trying to compile the source for Windows 7 x64 with Codeblocks, is there any solution to fix them?:

x86_64-w64-mingw32-g++.exe -Wall -fexceptions -pipe -O3 -m64 -D_FILE_OFFSET_BITS=64 -std=c++14 -Isrc -c C:\Users\Axelion\Downloads\melonDS-master\src\ARM.cpp -o obj\Release\src\ARM.o
x86_64-w64-mingw32-g++.exe -Wall -fexceptions -pipe -O3 -m64 -D_FILE_OFFSET_BITS=64 -std=c++14 -Isrc -c C:\Users\Axelion\Downloads\melonDS-master\src\ARMInterpreter_Branch.cpp -o obj\Release\src\ARMInterpreter_Branch.o
x86_64-w64-mingw32-g++.exe -Wall -fexceptions -pipe -O3 -m64 -D_FILE_OFFSET_BITS=64 -std=c++14 -Isrc -c C:\Users\Axelion\Downloads\melonDS-master\src\ARMInterpreter_LoadStore.cpp -o obj\Release\src\ARMInterpreter_LoadStore.o
x86_64-w64-mingw32-g++.exe -Wall -fexceptions -pipe -O3 -m64 -D_FILE_OFFSET_BITS=64 -std=c++14 -Isrc -c C:\Users\Axelion\Downloads\melonDS-master\src\Config.cpp -o obj\Release\src\Config.o
C:\Users\Axelion\Downloads\melonDS-master\src\ARM.cpp:164:21: error: variable or field 'Savestate' declared void
void ARM::Savestate(Savestate* file)
^
C:\Users\Axelion\Downloads\melonDS-master\src\ARM.cpp:164:30: error: expected primary-expression before '*' token
void ARM::Savestate(Savestate* file)
^
C:\Users\Axelion\Downloads\melonDS-master\src\ARM.cpp:164:32: error: 'file' was not declared in this scope
void ARM::Savestate(Savestate* file)
^
Process terminated with status 1 (0 minute(s), 0 second(s))

C:\Users\Axelion\Downloads\melonDS-master\src\ARMInterpreter_LoadStore.cpp: In function 'void ARMInterpreter::A_LDM(ARM*)':
C:\Users\Axelion\Downloads\melonDS-master\src\ARMInterpreter_LoadStore.cpp:423:36: warning: 'wbbase' may be used uninitialized in this function [-Wmaybe-uninitialized]
cpu->R[baseid] = wbbase;
^
C:\Users\Axelion\Downloads\melonDS-master\src\Config.cpp: In function 'void Config::Save()':
C:\Users\Axelion\Downloads\melonDS-master\src\Config.cpp:226:60: warning: format '%s' expects argument of type 'char*', but argument 4 has type 'void*' [-Wformat=]
fprintf(f, "%s=%s\n", entry->Name, entry->Value);
^
Process terminated with status 0 (0 minute(s), 1 second(s))
3 error(s), 2 warning(s) (0 minute(s), 1 second(s))

Arisotura
Posted on 10-15-18 11:00 AM Link | #676
unfinished shito which I apparently didn't finish or test

try an older revision, for now

____________________
Kuribo64

SIGMA
Posted on 10-15-18 01:35 PM Link | #677
I see. However, I've also tried out this version of the source:
https://github.com/StapleButter/melonDS/tree/aa3fc8be68e0d98649c33f15582e731d35a37041

Which tends to give me this error (I've also had this error with even older versions of the source) which I'd imagine is most likely on my end, although I don't know how to solve it:

||=== Build: Debug Windows in melonDS (compiler: GNU GCC Compiler) ===|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU.cpp||In function 'void GPU::StartScanline(u32)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU.cpp|690|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU2D.cpp||In member function 'void GPU2D::DrawBG_Large(u32, u32*)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU2D.cpp|1734|warning: variable 'xmossize' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU2D.cpp|1736|warning: unused variable 'tilesetaddr' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU2D.cpp||In member function 'void GPU2D::InterleaveSprites(u32*, u32, u32*)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU2D.cpp|1824|warning: unused variable 'blendfunc' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\Config.cpp||In function 'void Config::Save()':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\Config.cpp|226|warning: format '%s' expects argument of type 'char*', but argument 4 has type 'void*' [-Wformat=]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp||In function 'void GPU3D::SoftRenderer::PlotTranslucentPixel(u32, u32, u32, u32, u32)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|976|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp||In function 'void GPU3D::SoftRenderer::RenderShadowMaskScanline(GPU3D::SoftRenderer::RendererPolygon*, s32)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1126|warning: variable 'vlcur' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1126|warning: variable 'vlnext' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1126|warning: variable 'vrcur' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1126|warning: variable 'vrnext' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1131|warning: variable 'interp_start' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D_Soft.cpp|1132|warning: variable 'interp_end' set but not used [-Wunused-but-set-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D.cpp||In function 'void GPU3D::SubmitPolygon()':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D.cpp|715|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D.cpp|635|warning: unused variable 'prev' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\GPU3D.cpp|635|warning: unused variable 'next' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\areaevents.cpp||In function 'int areaKeyEvent(uiArea*, int, WPARAM, LPARAM)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\areaevents.cpp|256|warning: unused variable 'righthand' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\areaevents.cpp|257|warning: unused variable 'i' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\areascroll.cpp|137|warning: 'void hscrollto(uiArea*, int)' defined but not used [-Wunused-function]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\areascroll.cpp|182|warning: 'void vscrollto(uiArea*, int)' defined but not used [-Wunused-function]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\box.cpp||In function 'void boxRelayout(uiBox*)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\box.cpp|38|warning: unused variable 'i' [-Wunused-variable]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\colordialog.cpp||In function 'HWND__* replaceWithD2DScratch(HWND, int, SUBCLASSPROC, void*)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\colordialog.cpp|867|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp||In function 'HRESULT _logLastError(const WCHAR*, const WCHAR*, const WCHAR*, const WCHAR*)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp|22|warning: ISO C++ forbids converting a string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp||In function 'HRESULT _logHRESULT(const WCHAR*, const WCHAR*, const WCHAR*, const WCHAR*, HRESULT)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp|49|warning: ISO C++ forbids converting a string constant to 'WCHAR* {aka wchar_t*}' [-Wwrite-strings]|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp||In function 'void realbug(const char*, const char*, const char*, const char*, const char*, va_list)':|
C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp|76|error: 'vsprintf_s' was not declared in this scope|
||=== Build finished: 1 error(s), 23 warning(s) (0 minute(s), 15 second(s)) ===|

I apologize in advance if I've made an obvious and dumb mistake since I am mostly clueless when it comes to this kind of stuff and just wanted to try out the latest version through the source.

Arisotura
Posted on 10-15-18 01:44 PM Link | #678
seems to work? I'm not seeing any error within that blob, only warnings.

____________________
Kuribo64

SIGMA
Posted on 10-15-18 05:44 PM (rev. 4 of 10-17-18 02:06 PM) Link | #679
It's the last line where the error appears and prevents it from being compiled, it's:

C:\Users\Axelion\Downloads\melonDS-aa3fc8be68e0d98649c33f15582e731d35a37041\src\libui_sdl\libui\windows\debug.cpp|76|error: 'vsprintf_s' was not declared in this scope|
||=== Build finished: 1 error(s), 23 warning(s) (0 minute(s), 15 second(s)) ===|

EDIT: Ok, I managed to get it to compile after re-installing MinGW with the version provided by Msys. It compiles smoothly for me, but now I get this run-time error even though I've included the DLL's from the release which it requires to run in its bin > Debug directory:

[image]

Sorer
Posted on 10-18-18 07:20 PM Link | #684
It should work now thank you StapleButter.

Arisotura
Posted on 10-22-18 03:20 PM (rev. 2 of 10-22-18 03:21 PM) Link | #687
ideally I should apply the same fix to the cmakelists, but dunno -- it appears it includes usp10 but not gdi32, which is odd.

(for reference, the error happened because usp10 needs to be linked before gdi32)

whatever. RicBent is reworking the build system anyway.

____________________
Kuribo64


Main - General - Compilation errors on Windows Hide post layouts | New reply

Page rendered in 0.046 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 90/90, time: 0.015 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.