2017-02-09 24 views
0

這是開始,所以請原諒我的語言和知識。Freeimage ANSI C Codeblock Windows - 鏈接 - 新手

我使用ANSI C,CodeBlock和Windows。

我下面README.minGW但在開始時我的問題遇到

gcc -oFreeImageTest.exe FreeImageTest.c -lFreeImage 

什麼我正是這裏?我得到的錯誤:

gcc: error: FreeImageTest.c: No such file or directory 

我需要一個程序其中加載圖片和顯示位置從exif gps。

我也喜歡在C中使用這個庫的任何例子,但我不能在這裏。

請幫幫我。

+1

項目文件,如果使用代碼:: Blocks的你爲什麼要建立的文件夾中的擴展.cbp文件從命令行手動?爲什麼不讓Code :: Blocks處理所有這些,並且它會知道每個使用的源文件的位置。這就是你有的問題,你試圖在一個源文件不存在的地方構建。 –

+0

我不明白它是如何工作的。你能給我主要話題,我必須閱讀,以瞭解我必須做什麼? 我該做些什麼才能使用Code :: Blocks? – darius

+0

如果[用戶手冊](http://www.codeblocks.org/user-manual)或[FAQ](http://wiki.codeblocks.org/index.php?title=FAQ)或[維基](http://wiki.codeblocks.org/index.php/Main_Page)或甚至[他們的論壇](http://forums.codeblocks.org/)都無法幫助你,那我就不知道了如果有人在這裏可以幫助你。 –

回答

0

您安裝免費的圖像文件夾中創建一個文件夾,這樣

enter image description here

下面是一個代碼塊項目文件。 複製並粘貼到與您創建

公開賽在代碼塊

構建

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<CodeBlocks_project_file> 
    <FileVersion major="1" minor="6" /> 
    <Project> 
     <Option title="free_image_cb" /> 
     <Option pch_mode="2" /> 
     <Option compiler="gcc" /> 
     <Build> 
      <Target title="Debug"> 
       <Option output="../bin/free_image_cb" prefix_auto="1" extension_auto="1" /> 
       <Option object_output="obj/Debug/" /> 
       <Option type="1" /> 
       <Option compiler="gcc" /> 
       <Compiler> 
        <Add option="-g" /> 
       </Compiler> 
      </Target> 
      <Target title="Release"> 
       <Option output="../bin/free_image_cb" prefix_auto="1" extension_auto="1" /> 
       <Option object_output="obj/Release/" /> 
       <Option type="1" /> 
       <Option compiler="gcc" /> 
       <Compiler> 
        <Add option="-O2" /> 
       </Compiler> 
       <Linker> 
        <Add option="-s" /> 
       </Linker> 
      </Target> 
     </Build> 
     <Compiler> 
      <Add option="-Wall" /> 
      <Add option="-fexceptions" /> 
      <Add directory="../Dist/x32" /> 
     </Compiler> 
     <Linker> 
      <Add library="FreeImage" /> 
      <Add directory="../Dist/x32" /> 
     </Linker> 
     <Unit filename="../Examples/Generic/BatchLoad.cpp" /> 
     <Extensions> 
      <code_completion /> 
      <envvars /> 
      <debugger /> 
     </Extensions> 
    </Project> 
</CodeBlocks_project_file>