..:: PCSX2 Forums ::..

Full Version: Compile Guide
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Karyonix, as this post says, you cannot use Express to compile successfully, you need Pro.

(12-16-2008, 12:22 PM)Air Wrote: [ -> ]
(12-16-2008, 12:01 PM)thebozo1 Wrote: [ -> ]Yo, i followed the steps exactly, compiled with visual C++ 2008 express edition, but don't get an exe file generated anywhere, however i do get a Release directory generated with heaps of language files in them. I've searched the bin directory yet at no avail.

Visual Studio Express cannot compile Pcsx2. It does not include the MFC/ATL libraries necessary to build and link the resource files for the Pcsx2 GUI. There is no (easy) way to install MFC/ATL for Express either, as Microsoft went to great lengths to make sure that it was next to impossible to do so.

If you want to compile Pcsx2 for yourself you must download the full version of Visual Studio, available from the link posted in that very message you quoted, as a 90-day trial.
(02-16-2009, 04:20 PM)tabasket Wrote: [ -> ]I've been trying to compile gsdx and I finally got it to work, but I'm getting a lot of errors.
Code:
1>------ Build started: Project: GSdx, Configuration: Release SSSE3 Win32 ------
1>Performing Pre-Build Event...
1>SubWCRev: 'c:\Documents and Settings\Administrator\My Documents\PCSX2_SVN\plugins'
1>Last committed at revision 503
1>Updated to revision 503
1>Local modifications found
1>SubWCRev: 'c:\Documents and Settings\Administrator\My Documents\PCSX2_SVN\plugins'
1>Last committed at revision 503
1>Updated to revision 503
1>Local modifications found
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>GSWnd.cpp
1>GSVertexList.cpp
1>GSVector.cpp
1>GSUtil.cpp
1>GSTextureNull.cpp
1>GSTextureFX9.cpp
1>GSTextureFX10.cpp
1>GSTextureCacheSW.cpp
1>.\GSTextureCacheSW.cpp(302) : warning C4018: '>' : signed/unsigned mismatch
1>GSTextureCache9.cpp
1>GSTextureCache10.cpp
1>GSTextureCache.cpp
1>GSTexture9.cpp
1>GSTexture7.cpp
1>GSTexture10.cpp
1>GSTexture.cpp
1>GSTables.cpp
1>GSSetupPrimCodeGenerator.cpp
1>GSSettingsDlg.cpp
1>GSSetting.cpp
1>GSRendererSW.cpp
1>Compiling...
1>GSRendererNull.cpp
1>GSRendererHW.cpp
1>GSRenderer.cpp
1>GSPerfMon.cpp
1>GSFunctionMap.cpp
1>GSDump.cpp
1>GSDrawScanlineCodeGenerator.cpp
1>GSDrawScanline.cpp
1>.\GSDrawScanline.cpp(119) : warning C4018: '<' : signed/unsigned mismatch
1>.\GSDrawScanline.cpp(119) : warning C4244: '=' : conversion from 'UINT32' to 'unsigned short', possible loss of data
1>.\GSDrawScanline.cpp(120) : warning C4018: '<' : signed/unsigned mismatch
1>.\GSDrawScanline.cpp(120) : warning C4244: '=' : conversion from 'UINT32' to 'unsigned short', possible loss of data
1>.\GSDrawScanline.cpp(145) : warning C4244: '=' : conversion from 'UINT64' to 'unsigned short', possible loss of data
1>.\GSDrawScanline.cpp(146) : warning C4018: '<' : signed/unsigned mismatch
1>.\GSDrawScanline.cpp(146) : warning C4244: '=' : conversion from 'UINT32' to 'unsigned short', possible loss of data
1>GSDirtyRect.cpp
1>GSDeviceNull.cpp
1>GSDevice9.cpp
1>GSDevice7.cpp
1>.\GSDevice7.cpp(145) : warning C4389: '!=' : signed/unsigned mismatch
1>.\GSDevice7.cpp(145) : warning C4389: '!=' : signed/unsigned mismatch
1>GSDevice10.cpp
1>GSDevice.cpp
1>GSCrc.cpp
1>GSClut.cpp
1>GSCaptureDlg.cpp
1>GSCapture.cpp
1>GSBlock.cpp
1>GSAlignedClass.cpp
1>Compiling...
1>GS.cpp
1>GPUState.cpp
1>GPUSettingsDlg.cpp
1>GPURendererSW.cpp
1>GPURenderer.cpp
1>GPULocalMemory.cpp
1>GPUDrawScanline.cpp
1>GPU.cpp
1>Compiling...
1>wxutil.cpp
1>wxlist.cpp
1>wxdebug.cpp
1>vtrans.cpp
1>transip.cpp
1>transfrm.cpp
1>sysclock.cpp
1>strmctl.cpp
1>source.cpp
1>seekpt.cpp
1>schedule.cpp
1>renbase.cpp
1>refclock.cpp
1>pullpin.cpp
1>pstream.cpp
1>outputq.cpp
1>mtype.cpp
1>ddmm.cpp
1>ctlutil.cpp
1>combase.cpp
1>Compiling...
1>amvideo.cpp
1>amfilter.cpp
1>amextra.cpp
1>Compiling...
1>GSState.cpp
1>.\GSState.cpp(1057) : warning C4389: '==' : signed/unsigned mismatch
1>.\GSState.cpp(1057) : warning C4018: '<' : signed/unsigned mismatch
1>.\GSState.cpp(1057) : warning C4389: '==' : signed/unsigned mismatch
1>.\GSState.cpp(1083) : warning C4018: '>=' : signed/unsigned mismatch
1>.\GSState.cpp(1100) : warning C4018: '>' : signed/unsigned mismatch
1>.\GSState.cpp(1107) : warning C4018: '<' : signed/unsigned mismatch
1>.\GSState.cpp(1141) : warning C4389: '==' : signed/unsigned mismatch
1>.\GSState.cpp(1141) : warning C4389: '==' : signed/unsigned mismatch
1>GSRendererHW9.cpp
1>GSRendererHW10.cpp
1>GSRasterizer.cpp
1>GSLocalMemory.cpp
1>.\GSLocalMemory.cpp(1429) : warning C4244: '=' : conversion from 'DWORD' to 'WORD', possible loss of data
1>.\GSLocalMemory.cpp(1446) : warning C4244: '=' : conversion from 'DWORD' to 'BYTE', possible loss of data
1>.\GSLocalMemory.cpp(1463) : warning C4244: '=' : conversion from 'unsigned long' to 'BYTE', possible loss of data
1>.\GSLocalMemory.cpp(1480) : warning C4244: '=' : conversion from 'DWORD' to 'BYTE', possible loss of data
1>.\GSLocalMemory.cpp(1497) : warning C4244: '=' : conversion from 'unsigned long' to 'BYTE', possible loss of data
1>.\GSLocalMemory.cpp(1514) : warning C4244: '=' : conversion from 'unsigned long' to 'BYTE', possible loss of data
1>GSdx.cpp
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>   Creating library ..\..\bin\plugins\GSdx.lib and object ..\..\bin\plugins\GSdx.exp
1>Generating code
1>c:\documents and settings\administrator\my documents\pcsx2_svn\plugins\gsdx\baseclasses\wxutil.cpp(420) : warning C4706: assignment within conditional expression
1>c:\documents and settings\administrator\my documents\pcsx2_svn\plugins\gsdx\baseclasses\schedule.cpp(120) : warning C4706: assignment within conditional expression
1>Finished generating code
1>Embedding manifest...
1>Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\PCSX2_SVN\plugins\GSdx\Win32\Release SSSE3\BuildLog.htm"
1>GSdx - 0 error(s), 26 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
I saw some posts where people said they compiled successfully even with these errors, but I havent seen anything saying they are fine. So are these errors normal?
those aren't errors, they are warnings that the compiler gives out but it doesn't stop the project from compiling (which is why it compiles successfully) Smile

(02-16-2009, 04:20 PM)tabasket Wrote: [ -> ]Besides that, I have to manually set SDK's include and lib files for every plugin I want to compile. Meaning, going to the plugin's Properties and then adding the Include and Library Directories over and over. Could someone please help me with getting the additional SDK Directories set automatically? I've looked in the VS options for long time and cant find anything that will do that D:
for that you go to "Tools->Options->Projects and Solutions->VC++ Directories" and you put the include folders there (make sure you choose the right option under "Show Directories for") Smile
Dang, tried to link the dsound.lib manually and I also went into the options to make sure the default directory included the dx sdk files I acquired and still no go... I'm still getting the 2 unresolved externals; any other ideas?
in the include files under properties in VC++ include the include folder of the directx sdk. under the lib files in the same way include the directx SDk lib files. Yopu have to do both or it won't compile.
Will give it a shot thanks again. I'm also downloading platform SDK for another solution I read up on.

___

I'll be damned lol. For some reason it isn't accepting the directory for the DX SDK under the VS2k8 options, but when I specifiy it under the properties of each project that I'm trying to build it takes it there no problem and links correctly. Either way TY for the help and now I can enjoy new plugins as they come out Smile.
THANK YOU LUIS! I never noticed that you could select include or lib from that drop down menu -.-

darkt123, make sure that when you add the lib files for sdk, add the x64 and x86 folder separately.
(02-16-2009, 04:34 PM)karyonix Wrote: [ -> ]I build pcsx2 (32-bit) with Visual C++ 2008 Express on Windows 7 beta 64-bit yesterday.
The postBuild.cmd script seems to copy file incorrectly. It creates binpcsx2.exe instead of bin\pcsx2.exe. When moved to an appropriate directory, the file works well.

I suggest modifying pcsx2\windows\VCprojects\vsprops\postBuild.unknown like this.
Code:
set pcsxoutdir=%~2\bin
set pcsxoutname=%pcsxoutdir%\%~3%~4

IF NOT EXIST "%pcsxoutdir%" (
    md "%pcsxoutdir%"
)

copy /Y "%~1" "%pcsxoutname%"

if not ERRORLEVEL 1 (
    echo Target copied to %pcsxoutname%
)
exit /b 0

Done. Let me know if you still have problems with the build scripts.
(02-17-2009, 02:44 AM)tabasket Wrote: [ -> ]THANK YOU LUIS! I never noticed that you could select include or lib from that drop down menu -.-

darkt123, make sure that when you add the lib files for sdk, add the x64 and x86 folder separately.

That's another thing that I did wrong Blush wasn't going to talk about that mistake though >.>
Quote:for that you go to "Tools->Options->Projects and Solutions->VC++ Directories" and you put the include folders there (make sure you choose the right option under "Show Directories for") Smile

There is also another way... Just copy the files inside the DX SDK include and lib folders and paste it inside VC++ include and lib folders. Works like a charm for me.
I have two sections of codes which can't be compiled that I am on debian 5.0 linux 32 bits

One is when building zerospu2:
Quote:if gcc -DPACKAGE_NAME=\"ZeroSPU2\" -DPACKAGE_TARNAME=\"zerospu2\" -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"ZeroSPU2\ 0.1\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE=\"ZeroSPU2\" -DVERSION=\"0.1\" -DNDEBUG=1 -I. -I. -I./common -I./3rdparty -O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value -I/opt/X/include/pixman-1 -I/opt/X/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value -MT libZeroSPU2_a-interface.o -MD -MP -MF ".deps/libZeroSPU2_a-interface.Tpo" -c -o libZeroSPU2_a-interface.o `test -f 'Linux/interface.c' || echo './'`Linux/interface.c; \
then mv -f ".deps/libZeroSPU2_a-interface.Tpo" ".deps/libZeroSPU2_a-interface.Po"; else rm -f ".deps/libZeroSPU2_a-interface.Tpo"; exit 1; fi
if gcc -DPACKAGE_NAME=\"ZeroSPU2\" -DPACKAGE_TARNAME=\"zerospu2\" -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"ZeroSPU2\ 0.1\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE=\"ZeroSPU2\" -DVERSION=\"0.1\" -DNDEBUG=1 -I. -I. -I./common -I./3rdparty -O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value -I/opt/X/include/pixman-1 -I/opt/X/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -O3 -fomit-frame-pointer -fPIC -Wall -Wno-unused-value -MT libZeroSPU2_a-Linux.o -MD -MP -MF ".deps/libZeroSPU2_a-Linux.Tpo" -c -o libZeroSPU2_a-Linux.o `test -f 'Linux/Linux.cpp' || echo './'`Linux/Linux.cpp; \
then mv -f ".deps/libZeroSPU2_a-Linux.Tpo" ".deps/libZeroSPU2_a-Linux.Po"; else rm -f ".deps/libZeroSPU2_a-Linux.Tpo"; exit 1; fi
In file included from ./zerospu2.h:31,
from Linux/Linux.cpp:29:
./reg.h:182:7: warning: no newline at end of file
In file included from Linux/Linux.cpp:30:
Linux/Linux.h:75:22: warning: no newline at end of file
./misc.h: In function ‘long int InterlockedExchangeAdd(volatile long int*, long int)’:
./misc.h:130: warning: no return statement in function returning non-void
/usr/include/libintl.h: At global scope:
/usr/include/libintl.h:40: error: expected unqualified-id before ‘const’
/usr/include/libintl.h:40: error: expected `)' before ‘const’
/usr/include/libintl.h:40: error: expected initializer before ‘const’
/usr/include/libintl.h:45: error: expected unqualified-id before ‘const’
/usr/include/libintl.h:45: error: expected `)' before ‘const’
/usr/include/libintl.h:45: error: expected initializer before ‘const’
/usr/include/libintl.h:52: error: expected unqualified-id before ‘const’
/usr/include/libintl.h:52: error: expected `)' before ‘const’
/usr/include/libintl.h:52: error: expected initializer before ‘const’
/usr/include/libintl.h:83: error: expected unqualified-id before ‘const’
/usr/include/libintl.h:83: error: expected `)' before ‘const’
/usr/include/libintl.h:83: error: expected initializer before ‘const’
/usr/include/libintl.h:87: error: expected unqualified-id before ‘const’
/usr/include/libintl.h:87: error: expected `)' before ‘const’
/usr/include/libintl.h:87: error: expected initializer before ‘const’
make[1]: *** [libZeroSPU2_a-Linux.o] Error 1

One is when building the pcsx2 main program"
Quote:if gcc -DPACKAGE_NAME=\"pcsx2\" -DPACKAGE_TARNAME=\"pcsx2\" -DPACKAGE_VERSION=\"0.9.5\" -DPACKAGE_STRING=\"pcsx2\ 0.9.5\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE=\"pcsx2\" -DVERSION=\"0.9.5\" -DSVN_REV=\"\$Revision:\ 0\ \$\" -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE_NLS=1 -I. -I. -I./x86/ -I./common/ -pipe -O3 -fno-omit-frame-pointer -msse -fpermissive -Xlinker -zmuldefs -MT VUops.o -MD -MP -MF ".deps/VUops.Tpo" -c -o VUops.o VUops.cpp; \
then mv -f ".deps/VUops.Tpo" ".deps/VUops.Po"; else rm -f ".deps/VUops.Tpo"; exit 1; fi
In file included from Common.h:67,
from VUops.cpp:23:
SaveState.h:205:7: warning: no newline at end of file
VUflags.h: In function ‘void _vuOPMSUB(VURegs*)’:
VUflags.h:26: sorry, unimplemented: inlining failed in call to ‘u32 VU_MACx_UPDATE(VURegs*, float)’: function body not available
VUops.cpp:1326: sorry, unimplemented: called from here
VUflags.h:27: sorry, unimplemented: inlining failed in call to ‘u32 VU_MACy_UPDATE(VURegs*, float)’: function body not available
VUops.cpp:1327: sorry, unimplemented: called from here
VUflags.h:28: sorry, unimplemented: inlining failed in call to ‘u32 VU_MACz_UPDATE(VURegs*, float)’: function body not available
VUops.cpp:1328: sorry, unimplemented: called from here
make[1]: *** [VUops.o] Error 1

Any suggestion ?