Recent

Author Topic: Set DLL load path?  (Read 11388 times)

Superdisk

  • Jr. Member
  • **
  • Posts: 73
Set DLL load path?
« on: April 15, 2013, 03:11:19 am »
In Project -> Project Options -> Compiler Options -> Paths there is an option for the Libraries path (-Fl). I am using SDL in a project, but need the DLLs to be in a subfolder called native.

Modifying this path doesn't seem to work, and when I start the project using the "Play" button, the debugger borks. When I make a batch file that includes "native" in the system PATH, the program starts fine.

I need a way to configure Lazarus to include this folder in the PATH environment variable when starting the project.. how do I do this?

Thanks.

Superdisk

  • Jr. Member
  • **
  • Posts: 73
Re: Set DLL load path?
« Reply #1 on: April 17, 2013, 04:30:10 am »
Seriously, can no one answer this? On the Lazarus forums?  %)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Set DLL load path?
« Reply #2 on: April 17, 2013, 05:28:12 am »
How do you load this DLL?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Set DLL load path?
« Reply #3 on: April 17, 2013, 07:50:29 am »
AFAIU, what you did should work according to the docs (http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Libraries)

Perhaps people who used this functionality can comment...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12326
  • FPC developer.
Re: Set DLL load path?
« Reply #4 on: April 17, 2013, 09:07:48 am »
The -Fl path is for linking. The DLL must be there a linktime.

Your problem is with running, which means adjusting %path%

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Set DLL load path?
« Reply #5 on: April 17, 2013, 09:18:43 am »
The -Fl path is for linking. The DLL must be there a linktime.
Thanks, Marco: updated http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Libraries
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018