www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - import doesn't import jpg

reply "Zhenya" <zheny list.ru> writes:
immutable char[] texture = import("Chrysanthemum.jpg");
fails with message: unrecognized type jpg
but why?
Sep 04 2012
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 9/4/12, Zhenya <zheny list.ru> wrote:
 immutable char[] texture = import("Chrysanthemum.jpg");

Works for me on win32 & DMD2.060 and with "-J." switch. Which system/compiler are you using?
Sep 04 2012
prev sibling next sibling parent "Zhenya" <zheny list.ru> writes:
On Tuesday, 4 September 2012 at 19:03:03 UTC, Andrej Mitrovic 
wrote:
 On 9/4/12, Zhenya <zheny list.ru> wrote:
 immutable char[] texture = import("Chrysanthemum.jpg");

Works for me on win32 & DMD2.060 and with "-J." switch. Which system/compiler are you using?

DMD 2.060 Win32 with -J switch too
Sep 04 2012
prev sibling next sibling parent "Zhenya" <zheny list.ru> writes:
On Tuesday, 4 September 2012 at 19:04:33 UTC, Zhenya wrote:
 On Tuesday, 4 September 2012 at 19:03:03 UTC, Andrej Mitrovic 
 wrote:
 On 9/4/12, Zhenya <zheny list.ru> wrote:
 immutable char[] texture = import("Chrysanthemum.jpg");

Works for me on win32 & DMD2.060 and with "-J." switch. Which system/compiler are you using?

DMD 2.060 Win32 with -J switch too

VisualD -J Chrysanthemium.jpg
Sep 04 2012
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 9/4/12, Zhenya <zheny list.ru> wrote:
 -J Chrysanthemium.jpg

That's the issue. -J needs to be followed by a path, e.g. -J. (notice the dot), or -JC:\some\folder, and no spaces so don't use -J C:\some\folder. Remember that you're putting a directory path, not a file path with -J.
Sep 04 2012
prev sibling parent "Zhenya" <zheny list.ru> writes:
On Tuesday, 4 September 2012 at 19:38:08 UTC, Andrej Mitrovic 
wrote:
 On 9/4/12, Zhenya <zheny list.ru> wrote:
 -J Chrysanthemium.jpg

That's the issue. -J needs to be followed by a path, e.g. -J. (notice the dot), or -JC:\some\folder, and no spaces so don't use -J C:\some\folder. Remember that you're putting a directory path, not a file path with -J.

Thank you very much:)
Sep 04 2012