Post Reply 
[C Help] Jumping from PSP to PC
Author Message
S7*
Sweet Dreams

Posts: 16,689.4373
Threads: 1,056
Joined: 3rd Apr 2007
Reputation: 14.29926
E-Pigs: 383.2289
Offline
Post: #1
[C Help] Jumping from PSP to PC
Yeah I'm sure you know its more n00b questions.... I just need to straighten a few things out cause Im well confused right now.

I made some rough code for a 'brew for the PSP but I'm no longer interested in working on it for PSP...... I want to do it for Windows instead.

And yeah, while theres the same language © its the libraries and dev environment that have got me confused.

For example, I have libpng used in my draft code, but how do I use it through Windows dev environments?

I tried Dev-C++ but I got stopped at the fact I needed libpng, and the "devpak" system they use has missing files for libpng so I couldn't progress further.

I tried Cygwin (I know I'm an idiot for trying that for Windows apps) so lets just forget about that......

Now last night I installed MinGW and MSYS and I think that should get me somewhere so that brings me to my question.

Building libraries in a Windows environment makes dlls out of libraries doesn't it?

How do I go about changing PSP include code to code that would work for compiling a program for Windows?

Finally, it seems MinGW still requires it be dependent on a link file... and requires the flag '-mno-cygwin' for a program to work independently but when I was in cygwin doing that would cause build errors while not using it wouldnt - and I'm guessing the same will apply for MinGW......

Point me in the right direction please xD
17/09/2009 02:54 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #2
RE: [C Help] Jumping from PSP to PC
Senseito URΩBΩROS Wrote:For example, I have libpng used in my draft code, but how do I use it through Windows dev environments?
Compile libpng for Windows or just grab a binary and change your linker options to use the library (or copy the (probably .lib) files to the compiler's lib directory).
http://www.google.com.au/search?q=libpng...=firefox-a

Senseito URΩBΩROS Wrote:I tried Cygwin (I know I'm an idiot for trying that for Windows apps) so lets just forget about that......
If you're using POSIX stuff, it might actually be easier to use Cygwin. (it's a PSP app, not POSIX I believe)

Senseito URΩBΩROS Wrote:Building libraries in a Windows environment makes dlls out of libraries doesn't it?
If it's dynamically linked.  If it's statically linked, it'll be put into the EXE.  If you download precompiled binaries, it'll probably be dynamically linked.

Senseito URΩBΩROS Wrote:How do I go about changing PSP include code to code that would work for compiling a program for Windows?
You should be able to straight remove them.  Then you determine what functions you need to fix up.


Haven't actually used cygwin or MiniGW myself so can't say anything about the rest.
(This post was last modified: 17/09/2009 03:08 AM by ZiNgA BuRgA.)
17/09/2009 03:07 AM
Visit this user's website Find all posts by this user Quote this message in a reply
S7*
Sweet Dreams

Posts: 16,689.4373
Threads: 1,056
Joined: 3rd Apr 2007
Reputation: 14.29926
E-Pigs: 383.2289
Offline
Post: #3
RE: [C Help] Jumping from PSP to PC
ZiNgA BuRgA Wrote:
Senseito URΩBΩROS Wrote:For example, I have libpng used in my draft code, but how do I use it through Windows dev environments?
Compile libpng for Windows or just grab a binary and change your linker options to use the library (or copy the (probably .lib) files to the compiler's lib directory).
http://www.google.com.au/search?q=libpng...=firefox-a

And I assume you can use that method for Dev-C++?
17/09/2009 03:18 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #4
RE: [C Help] Jumping from PSP to PC
Senseito URΩBΩROS Wrote:And I assume you can use that method for Dev-C++?
I fail to see why it shouldn't.
17/09/2009 03:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
S7*
Sweet Dreams

Posts: 16,689.4373
Threads: 1,056
Joined: 3rd Apr 2007
Reputation: 14.29926
E-Pigs: 383.2289
Offline
Post: #5
RE: [C Help] Jumping from PSP to PC
ZiNgA BuRgA Wrote:
Senseito URΩBΩROS Wrote:And I assume you can use that method for Dev-C++?
I fail to see why it shouldn't.

Hihi alright I'll give it a try when I get home.

What about libraries not compiled to Binaries?

How would I go about compiling them?
17/09/2009 04:00 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #6
RE: [C Help] Jumping from PSP to PC
You just need to have the files with your project (dunno if your IDE will require some compiler/linker option changes).  Will probably need to change your #include directives to reflect this too.
(This post was last modified: 17/09/2009 04:06 AM by ZiNgA BuRgA.)
17/09/2009 04:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
S7*
Sweet Dreams

Posts: 16,689.4373
Threads: 1,056
Joined: 3rd Apr 2007
Reputation: 14.29926
E-Pigs: 383.2289
Offline
Post: #7
RE: [C Help] Jumping from PSP to PC
ZiNgA BuRgA Wrote:You just need to have the files with your project (dunno if your IDE will require some compiler/linker option changes).  Will probably need to change your #include directives to reflect this too.

so LIBs get compiled at the same time as the Application? Unusual... but I'll have a look at it.
17/09/2009 04:07 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #8
RE: [C Help] Jumping from PSP to PC
Senseito URΩBΩROS Wrote:
ZiNgA BuRgA Wrote:You just need to have the files with your project (dunno if your IDE will require some compiler/linker option changes).  Will probably need to change your #include directives to reflect this too.

so LIBs get compiled at the same time as the Application? Unusual... but I'll have a look at it.
No, precompiled files get linked.
This is the process of how C/C++ compilation generally works:

source code » preprocessor » compiler » linker » executable
executable » link with DLLs » process
17/09/2009 04:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
S7*
Sweet Dreams

Posts: 16,689.4373
Threads: 1,056
Joined: 3rd Apr 2007
Reputation: 14.29926
E-Pigs: 383.2289
Offline
Post: #9
RE: [C Help] Jumping from PSP to PC
ZiNgA BuRgA Wrote:
Senseito URΩBΩROS Wrote:
ZiNgA BuRgA Wrote:You just need to have the files with your project (dunno if your IDE will require some compiler/linker option changes).  Will probably need to change your #include directives to reflect this too.

so LIBs get compiled at the same time as the Application? Unusual... but I'll have a look at it.
No, precompiled files get linked.
This is the process of how C/C++ compilation generally works:

source code » preprocessor » compiler » linker » executable
executable » link with DLLs » process

I see what you're saying

but I as asking about Libraries that HAVEN'T been precompiled.
17/09/2009 04:44 AM
Find all posts by this user Quote this message in a reply
Assassinator
...

Posts: 6,646.6190
Threads: 176
Joined: 24th Apr 2007
Reputation: 8.53695
E-Pigs: 140.8363
Offline
Post: #10
RE: [C Help] Jumping from PSP to PC
compile them separately
17/09/2009 04:47 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: