#1  
Old 22nd September 2016, 09:47 PM
Ntrl_Causes Ntrl_Causes is offline
Junior Member
 
Join Date: Dec 2011
Posts: 3
Default Compiling from source!

Hey there guys! I'm trying to compile pj64 from the source code provided on the site.

I'm using Visual Studios 2015 Enterprise, and am running into a lot of problems, as can be expected.

Do any of you have any experience compiling from source? What compiler seems to work best?

I don't mean to be one of those people, but I'm in over my head here, and would love some help.

I have the solution made in visual studios but I run into a ton of compile errors.
Reply With Quote
  #2  
Old 22nd September 2016, 10:53 PM
Frank74's Avatar
Frank74 Frank74 is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Aug 2013
Location: UK
Posts: 831
Default

You need Visual Studio 2015 Community edition. Express is a cut down version. I did manage to compile the Project64.exe with VS2008 Express. Was a long time ago though.
Reply With Quote
  #3  
Old 23rd September 2016, 12:17 AM
Ntrl_Causes Ntrl_Causes is offline
Junior Member
 
Join Date: Dec 2011
Posts: 3
Default

I have the Enterprise version. It should be even more complete than the community version of Visual Studio.

This is my first time building from a source code without a makefile or a something similar to that. Will I need to have all of the available source code (pj64, RSP Compiler, and RSP Interpreter) to be able to compile?

Will I need to use a compatibility mode in Visual Studios?

Sorry for all of the questions, like I said, I'm new to this, and haven't been able to find any guides online.

Last edited by Ntrl_Causes; 23rd September 2016 at 12:22 AM.
Reply With Quote
  #4  
Old 23rd September 2016, 12:50 AM
Frank74's Avatar
Frank74 Frank74 is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Aug 2013
Location: UK
Posts: 831
Default

Just open the solution file (Project64.sln), select Release configuration and build solution.

There are lots of warnings, but you shouldn't get any errors that stop it from compiling.

After build is complete, I usually goto Source/Script folder and run package_zip.cmd. It will put Project64 package into a zip in Package folder next to solution file.

Last edited by Frank74; 23rd September 2016 at 12:56 AM.
Reply With Quote
  #5  
Old 23rd September 2016, 02:02 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,260
Default

Quote:
Originally Posted by Ntrl_Causes View Post
Hey there guys! I'm trying to compile pj64 from the source code provided on the site.

This is my first time building from a source code without a makefile or a something similar to that. Will I need to have all of the available source code (pj64, RSP Compiler, and RSP Interpreter) to be able to compile?
It sounds like you're trying to compile the 1.4 C source code instead of the newer C++ sources on the Project64 GitHub.

You said "the site"; that could mean on pj64-emu.com or github.com. "RSP Compiler", "RSP Interpreter", and "all of the available source code" are expressions used with respect to the 1.4 source code on the main site.

You can compile the 1.4 source code if you want. I preferred it at first while I was trying to improve the portability, but the newest version is 2.2 (or was it 2.3 nowadays, well it's 2.something) which you can find off the GitHub.

Alternatively you also could get the GitHub URL plus some questions answered on Freenode if you're familiar with IRC. The channel is #project64, but I'm sort of busy.

Quote:
Originally Posted by Ntrl_Causes View Post
What compiler seems to work best?

I have the Enterprise version. It should be even more complete than the community version of Visual Studio.
Just Community is fine.

Enterprise may be more complete than Community, but I often struggle with RAM and performance issues when using a GUI like modern Visual Studio. Just some plain command-line compilers with the necessary dependencies supplied is good enough to compile Project64--of these MSVC and GCC (Android or MinGW) have been tested to work.

Express is even more lightweight in CPU and GUI intensity than Community editions are, except I think Project64 cannot compile in those due to usage of the ATL.

Last edited by HatCat; 23rd September 2016 at 02:06 PM.
Reply With Quote
  #6  
Old 25th September 2016, 03:21 AM
Ntrl_Causes Ntrl_Causes is offline
Junior Member
 
Join Date: Dec 2011
Posts: 3
Default

This is a life saver. I'd almost gotten the 1.4 source compiled, but still haven't had any success. (My current hang-up is that the linker cant find LIBC.lib)

I'll check out the GitHub and download that code!
Reply With Quote
  #7  
Old 25th September 2016, 07:14 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,260
Default

Quote:
Originally Posted by Ntrl_Causes View Post
This is a life saver. I'd almost gotten the 1.4 source compiled, but still haven't had any success.
Have compiled it once last year.

The 1.4 sources to Project64 do not compile out-of-the-box as distributed on the main site. IIRC you have to remove an #include and change something else to get it to compile. You may have figured this part out already if you're just getting linker errors, not compile errors.

It's also faster to try compiling 1.4 with VC 6.0 instead of MSVC 2015. It took me some extra changes to get 1.4 to compile on versions of MSVC past VC6.

Quote:
Originally Posted by Ntrl_Causes View Post
(My current hang-up is that the linker cant find LIBC.lib)
That's due to a poor configuration in the VC6 solution file.

If you can find the linker input settings in VS2015, remove that file name. It's hardly plausible that you need it, and either with VC2015 or VC 6.0 (that old version of MSVC from 1998) you can still tell it to statically or dynamically link the C run-time dependency.

Quote:
Originally Posted by Ntrl_Causes View Post
I'll check out the GitHub and download that code!
2.x versions of today's Project64 will be much easier to compile straight from the repository without having to change anything, but if you have issues with that either forums or IRC are fine.
Reply With Quote
  #8  
Old 13th January 2019, 02:11 AM
charly400 charly400 is offline
Junior Member
 
Join Date: Jan 2019
Posts: 2
Default

Hi HatCat, i just compiled the code of the emulator, but cant compile the plugins, for the emulator i deleted reverse code.h and deleted some definitions already defined, some macros which are: TreeView_GetCheckState, TreeView_SetCheckState, for the plugins code there is a lot of errors i am trying to fix, but when i fix one, other two or a hundred appears, do you know how i can get this going?

Last edited by charly400; 13th January 2019 at 02:56 PM.
Reply With Quote
  #9  
Old 13th January 2019, 02:23 PM
ExtremeDude2's Avatar
ExtremeDude2 ExtremeDude2 is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Apr 2010
Location: USA
Posts: 2,857
Default

What plugins are you trying to compile?
__________________
Quote:
Originally Posted by dsx! View Post
are you american or something
Reply With Quote
  #10  
Old 13th January 2019, 03:12 PM
charly400 charly400 is offline
Junior Member
 
Join Date: Jan 2019
Posts: 2
Default

Hi extreme dude, i am american, from Argentina, i am new in the forum, just messing with this source code, the 1.4 version, i just compiled the 2.3 version but, i read in the forum that 1.4 is most acurate than 2.3 in some aspects like the rom booting process, i am someone who enjoy sharing good information and utilities with people who share the same interests in all this that is the programming of consoles, then as i am trying to compile code i am geting some errors, errors like: expression must have struct or union type, with this RSP_GPR[RSPOpC.base], looks like an struct element inside an array, i dont get the problem with this, or what kind of struct is needed, the plugins i am trying to compile comes with this source code, the 1.4, it says RSP compiler plugins, i have some good compilers to share with you if you like, do you know how to attach code?,so i can post the file here

Last edited by charly400; 13th January 2019 at 03:19 PM.
Reply With Quote
Reply

Tags
compile, how-to, source

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.