NO

Author Topic: Multiple source files problem  (Read 3880 times)

PaulR

  • Guest
Multiple source files problem
« on: August 13, 2012, 10:18:40 PM »
Hello

I installed Pelles C on a Win XP machine earlier with no problems and could create multi-file projects.

This evening I installed it on a Win 7 Home Premium (64 bit) machine but I don't seem to be able to open more than one source file per project; for example if I create a new project with source files main.c and functions.c I can only edit main.c - functions.c won't open from the project tree via double click or right click and 'open'. Likewise I can't open it via File->Open.

Notable things:

I get a user account control warning each time I try to start Pelles C.
I tried the 64 bit version but couldn't get it to work with SDL so I uninstalled it and installed the 32 bit version instead. (A sample SDL program from http://www.friedspace.com/cprogramming/sdlbasic.php works fine).
The files exist, I've opened them from outside Pelles C.

I've tried everthing I can think of (in View, Project Options and Tools->Options) but to no avail. I'd appreciate any suggestions (unless I'm doing something really stupid in which case i'd prefer a quiet whisper :) ), I'm really impressed with this compiler/ide combination!

TIA

Paul

CommonTater

  • Guest
Re: Multiple source files problem
« Reply #1 on: August 14, 2012, 12:45:20 AM »
Ok... I've seen this one before...

Whatever the instructions tell you DO NOT copy outsider files to the Pelles C directories.  Just don't do it. 
Instead set them up in their own folder in your project space and add the folders to your Project Options on a project by project basis. 
( Project->Project Options->Folders ) 
 
Now since it seems you've got a mangled installation on your hands...   
  • Uninstall Pelles C. 
  • Open explorer and go to c:\Program Files (x86) and delete the Pelles C folder if it's still there
  • Now go to C:\Program Files and delete the Pelles C folder if you find one there as well.
  • Press and hold the windows logo key and type an R, you should see a run dialog... In the Run dialog type REGEDIT and click OK... in RegEdit path to HKEY_CURRENT_USER\Software... now locate the branch named "Pelle Orinius"... right click on it and delete it.
If you don't already have Pelles C version 7.0 go and download the 64 bit version (because you're on a 64 bit os) and install it into the default location (C:\Program Files\PellesC).  You will need to rebuild the browse info (it will prompt you) and you should go into the options panels and set everything up to your liking ...

Since the SDL libraries are 32 bits, you have some choices here... Use them only in 32 bit projects (P.C x64 creates either 32 or 64 bit projects) -or- recompile them into both 32 and 64 bit versions so you can use them in either 32 or 64 bit projects.  In either case --except for addins and wizards-- don't be putting the files into any folder inside the Pelles C insallation.  As I said above, set them up in their own folder(s) and add the folders to your project options on a project by project basis.
 
For the UAC problem... find POIDE64.EXE in your PellesC\bin folder, right click select ->Properties->Compatibility and check "Run as Administrator" --or-- Control Panel->Action Center->Change User Account Control Settings and disable the UAC warnings entirely.
 
« Last Edit: August 14, 2012, 01:14:16 AM by CommonTater »

PaulR

  • Guest
Re: Multiple source files problem
« Reply #2 on: August 14, 2012, 07:41:53 AM »
Many thanks for the thorough reply, I'm sure it will be of help to others too.

I had seen various posts here warning about putting files inside the Pelles C subdirectories (and must admit it's not the sort of thing I'd usually do) but I wanted to follow the somewhat lengthy instructions to get SDL up and running and didn't want to deviate from them.

With regard to UAC I tried to install the certificate in the 'Trusted' set as per Windows instructions but it made no difference.

I'll try a complete erase/re-install later and report back - thanks once again :D

Paul

PaulR

  • Guest
Re: Multiple source files problem
« Reply #3 on: August 15, 2012, 11:58:57 AM »
I've put this to one side for a while until I've sorted out the Win XP 32bit machine and have a working install of SDL without having includes and libraries in my Pelles C directories! I'm almost there on that score - I'm starting a new thread with details as it may be helpful to others trying to get SDL up and running.

Paul