Results 1 to 9 of 9

Thread: FPC Multi Unit Compilations

  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45

    FPC Multi Unit Compilations

    A bit of frustration found me again, just a day after my last post... My dilemna is I would like to use Audorra as a starting point for Prometheus_Audio, but it requires haveing around 100 files in the root directory, inconvenient and I the only solution I have seen is to use -Fi and -Fu switches, which rules out default IDE compiling and requires custom build commands. Not newbie-friendly.

    My question is how can I tell fpc where to look for the unit files from within the unit? I have succeeded (sort of) where it finds the destination unit but not the other unit's requirements... Ie. PROM_AUDIO -> Unit1 but if Unit1 needs Unit2 it cant find it althouh Unit2 is in the same directory as Unit1...

    Is it possible to compile many units into one big .ppu file? if so how. As in, can the Prometheus_Audio.ppu file contain ALL dependancies somehow?

    cheers,
    code_glitch.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Or alternatively, would someone be willing to submit an FPC version of their audio interface I could use to make Prometheus_Audio?? I've had so many problems and minor issues, its unbelievable. And yes, I tried everything for Noeska's tutorials to no avail. WAV is 100% but no other files seem to work in FPC. And thats a problem.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #3
    Quote Originally Posted by code_glitch
    My question is how can I tell fpc where to look for the unit files from within the unit?
    Without compiler/IDE options only in this way
    Code:
    uses
      MyUnit in 'MyUnitDirectory/MyUnit.pas';

  4. #4
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    I tried that. it finds the target unit but not the targets dependencies. eg.

    uses
    CustomUnit in 'Prometheus\Audio\CustomUnit.pas';

    And it will find it. But if customunit uses bobunit and bobunit is also in the Prometheus\Audio\ folder it will not find it. Hence the problem.

    cheers for the response though,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  5. #5
    Quote Originally Posted by code_glitch
    But if customunit uses bobunit and bobunit is also in the Prometheus\Audio\ folder it will not find it. Hence the problem.
    If you want to do something in wrong way you must "go to the end" by fixing all the units. For normal people developers invented special options for compilers...

  6. #6
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Just wondering if this COULD work.

    If I copy Paste ALL the code into one big file and compile it. Could I just link to that mega-unit?

    And anyone have an FPC demo program that plays ogg? Sorry to go there again but all example I found for FPC were outdated and use the AL_EXT_VORBIS and the like (which to my understanding are depreciated) and thus dont work. Other than that all I have seen are for Delphi/lazarus. Both of them are alien worlds to me and make no sense... Any help would be soooo apreciated.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  7. #7
    Quote Originally Posted by code_glitch View Post
    the only solution I have seen is to use -Fi and -Fu switches, which rules out default IDE compiling and requires custom build commands. Not newbie-friendly.
    -Fu paths are exactly what i have to use with Lazarus libs. It doesn't even work recursively so you have to add each single directory. If you directly program FPC with command line you can say that's million years away from newbie friendly anyway (lol).

  8. #8
    Quote Originally Posted by code_glitch
    And anyone have an FPC demo program that plays ogg?
    I think you will never find the standalone example. But with source code of FreePascal you can find a standard demo. Unpack the archive and go to "src/packages/openal/examples". There are madopenl.pas and Makefile.

    Quote Originally Posted by code_glitch
    Other than that all I have seen are for Delphi/lazarus. Both of them are alien worlds to me and make no sense...
    The world would be boring and not interesting without complicated situations, so try to do something by your self. For example - try to understand those examples and translate them to your own code

  9. #9
    Said in the words of the master "Programming is inherently non-trivial" [Grandmaster Wirth], so live with it. We still have it way better than the competition
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •