簡體   English   中英

鏈接 SDL_image 錯誤

[英]Linking SDL_image errors

我在 Windows 7 下的 cygwin 上的 gcc 3 中鏈接 SDL_image 時遇到問題。

我收到以下錯誤:

/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lSDL_image

我的 makefile 出現如下:

all: rabbit

rabbit: main.o rabbit.o renderer.o
        g++ -o rabbit main.o rabbit.o renderer.o -lSDLmain -lSDL -lSDL_image 

main.o: main.cpp rabbit.h 
        g++ -c main.cpp 

rabbit.o: rabbit.cpp rabbit.h gameobject.h
        g++ -c rabbit.cpp

renderer.o: renderer.cpp renderer.h
        g++ -c renderer.cpp 

clean:
        rm -rf *o rabbit

I store SDL_image.dll, SDL_image.lib, jpeg.dll, libpng12-0.dll, libtiff-3.dll, and zlib1.dll in the directory with my executable. SDL_image.h 也在正確的位置。

請幫忙,這已經有幾天了!

SDL_image不是核心 SDL 分發的一部分。 它必須單獨安裝。

檢查您是否安裝了/usr/local/lib/libSDL_image.a或共享庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM