Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Libraries

NinthAngleNinthAngle Posts: 98Member
Hi,
I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html

which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
"ERROR Mode switch Delphi not allowed here"

Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
lots of questions... :-?

NA

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi,
    : I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html
    :
    : which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
    : "ERROR Mode switch Delphi not allowed here"
    :
    : Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
    : lots of questions... :-?
    :
    : NA
    :
    Unzip them into a directory, which is part of the search paths of pascal. These are all units, which must be included in the uses list of the units/program source you write, which use the procedures/functions defined in those units. By placing them in one of the search paths of pascal, you only need 1 copy of them on your harddrive.
    The error you get might be the result of differences in versions between your Freepascal and the one it was designed for. Try removing the command, which gives you the error.
  • omair19omair19 Posts: 39Member
    : : Hi,
    : : I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html
    : :
    : : which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
    : : "ERROR Mode switch Delphi not allowed here"
    : :
    : : Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
    : : lots of questions... :-?
    : :
    : : NA
    : :

    if you are using windows use explorer to navigate to the folder on which ypur free pascal is installed then press f3 the filesearch windows will open in the tick ''search for files and folders'' and type ''libraries'' you should be able to locate the (correct) library folder that way and place unit in that folder, if you are placing it in the correct folder and still your compiler gives you an error than verify weather or not unit is free of errors,installing latest version of your compiler might also help,maybe delphi's ide can be used to write pascal programs if you type {console} on top of your code so if all else fail use delphi because unit was initially intended for delphi
    sorry for my english:)
  • NinthAngleNinthAngle Posts: 98Member
    [b][red]This message was edited by NinthAngle at 2005-8-17 13:49:7[/red][/b][hr]

    : : Hi,
    : : I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html
    : :
    : : which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
    : : "ERROR Mode switch Delphi not allowed here"
    : :
    : : Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
    : : lots of questions... :-?
    : :
    : : NA
    : :
    : Unzip them into a directory, which is part of the search paths of pascal. These are all units, which must be included in the uses list of the units/program source you write, which use the procedures/functions defined in those units. By placing them in one of the search paths of pascal, you only need 1 copy of them on your harddrive.
    : The error you get might be the result of differences in versions between your Freepascal and the one it was designed for. Try removing the command, which gives you the error.
    :




    How do I know a directory is part of pascals search path? Im not sure which directory to use for any of the files.


  • NinthAngleNinthAngle Posts: 98Member
    : : : Hi,
    : : : I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html
    : : :
    : : : which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
    : : : "ERROR Mode switch Delphi not allowed here"
    : : :
    : : : Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
    : : : lots of questions... :-?
    : : :
    : : : NA
    : : :
    :
    : if you are using windows use explorer to navigate to the folder on which ypur free pascal is installed then press f3 the filesearch windows will open in the tick ''search for files and folders'' and type ''libraries'' you should be able to locate the (correct) library folder that way and place unit in that folder, if you are placing it in the correct folder and still your compiler gives you an error than verify weather or not unit is free of errors,installing latest version of your compiler might also help,maybe delphi's ide can be used to write pascal programs if you type {console} on top of your code so if all else fail use delphi because unit was initially intended for delphi
    : sorry for my english:)
    :
    I tried doing a search for "libraries" and windows (even with the help of that annoying little dog) found no folders with sch a name. I did, however, do a search for *.tpu (which I assume are unit files) and found out that most of pascals units are stored in a folder called "units."
    What baffles me though is that none of the libraries i downloaded include TPU files.

    Furthermore, I followed Zibadians comment on removing that piece of code which prompted the error message: "Error mode switch delphi not allowed here."
    Since then this message has not been bothering me, which is good. The problem now lies with pascal asking for a DirectX unit. The Graphix site specifically says one should download another library called directx. which I did but now, once again, dont know where to unzip. So if anyone can help me locate a directory for my phantom units, well be killing 2 birds with one stone.

    regards,
    Ninth Angle
  • zibadianzibadian Posts: 6,349Member
    : [b][red]This message was edited by NinthAngle at 2005-8-17 13:49:7[/red][/b][hr]
    :
    : : : Hi,
    : : : I found a Library called "Graphix" : http://www.cg.tuwien.ac.at/~knapp/graphix_old/gxframe.html
    : : :
    : : : which Im hoping to use to insert grafic (*.bmp *.jpg *.img) content into a program im writing. However, I have no experience with libraries. Where to does one unzip the downloladed zip file to? how do libraries integrate into the rest of a pascal program? Whenever I try to simply execute one of the .pas files that come with the graphix package, I receive the following error:
    : : : "ERROR Mode switch Delphi not allowed here"
    : : :
    : : : Does this mean that Graphix was only meant for Delphi even though the version i downloaded explicitly said it would work for my Freepascal compiler?
    : : : lots of questions... :-?
    : : :
    : : : NA
    : : :
    : : Unzip them into a directory, which is part of the search paths of pascal. These are all units, which must be included in the uses list of the units/program source you write, which use the procedures/functions defined in those units. By placing them in one of the search paths of pascal, you only need 1 copy of them on your harddrive.
    : : The error you get might be the result of differences in versions between your Freepascal and the one it was designed for. Try removing the command, which gives you the error.
    : :
    :
    :
    :
    :
    : How do I know a directory is part of pascals search path? Im not sure which directory to use for any of the files.
    :
    :
    :
    The search path is listed somewhere in the settings/options of Pascal. I'm a Turbo Pascal/Delphi user myself, so I don't know FreePascal that well. You should read the documentsation of FreePascal to find where exactly.
Sign In or Register to comment.