Author Topic: How to develop graphic programs using codeblocks?  (Read 46180 times)

Offline liklstar

  • Single posting newcomer
  • *
  • Posts: 7
How to develop graphic programs using codeblocks?
« on: August 12, 2010, 06:23:41 am »
Does codeblocks provides any graphics liberary or header file (such as "graphics.h and graphics.lib in Turbo C") to support graphics program developing?

How and what should I do if I develop a graphics program? Should I include any liberary or header file in the program as same as in Turbo C envirenment?

I am using Code::Blocks for windows and  GNU GCC as the compiler!
« Last Edit: August 12, 2010, 06:35:41 am by liklstar »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: How to develop graphic programs using codeblocks?
« Reply #1 on: August 12, 2010, 06:39:27 am »
Does codeblocks provides any graphics liberary or header file (such as "graphics.h and graphics.lib in Turbo C") to support graphics program developing?
As Code::blocks is just an IDE you can use ANY graphics library of your choice.

If you mean a WYSIWYG Editor, then C::B ships with the "wxSmith" plugin(s), that allow you to create UI's using wxWidgets.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline liklstar

  • Single posting newcomer
  • *
  • Posts: 7
Re: How to develop graphic programs using codeblocks?
« Reply #2 on: August 12, 2010, 10:52:30 am »
Does codeblocks provides any graphics liberary or header file (such as "graphics.h and graphics.lib in Turbo C") to support graphics program developing?
As Code::blocks is just an IDE you can use ANY graphics library of your choice.

If you mean a WYSIWYG Editor, then C::B ships with the "wxSmith" plugin(s), that allow you to create UI's using wxWidgets.

I have tried to link the Graphics.lib of Turbo C with codeblocks, but I fail. Are you sure it can? If codeblocks do can link turbo c library, how should I do step by step?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How to develop graphic programs using codeblocks?
« Reply #3 on: August 12, 2010, 12:40:41 pm »
Please read the first to items in the C::B's FAQ: http://wiki.codeblocks.org/index.php?title=FAQ
After that I hope you'll understand what you've to do or where to ask further questions...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline liklstar

  • Single posting newcomer
  • *
  • Posts: 7
Re: How to develop graphic programs using codeblocks?
« Reply #4 on: August 12, 2010, 03:29:21 pm »
Please read the first to items in the C::B's FAQ: http://wiki.codeblocks.org/index.php?title=FAQ
After that I hope you'll understand what you've to do or where to ask further questions...

Excuse me!
I have set the related items according to the following for many times, but C::B still connot find the target library!

Q: I would like to compile a project using some non-standard libraries. How can I indicate to CodeBlocks that these libraries and include files exist?
A: You can specify them for your global environment or just for your project.
For global environment :
- Menu Settings/Compiler and debugger
- In the Global compiler settings, select the directories tab
- Add the required paths for compiler and linker.

For your project :
- Right click on the project then select Build options
- Select the directories tab
- Add the required paths for compiler and linker.
- Add your specific libraries in the linker tab.
- Pay attention to project settings and target settings.


Now, I don't think C::B can link Turbo C's non-standard library to the target code unless you  told me how to resolve this trouble!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: How to develop graphic programs using codeblocks?
« Reply #5 on: August 12, 2010, 03:41:35 pm »
Turn on Full Compiler Logging and maybe you can see your problem or some else can see it.

Quote
Logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline liklstar

  • Single posting newcomer
  • *
  • Posts: 7
Re: How to develop graphic programs using codeblocks?
« Reply #6 on: August 12, 2010, 04:01:40 pm »
Turn on Full Compiler Logging and maybe you can see your problem or some else can see it.

Quote
Logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"

Tim S.

D:\WorkingArea\Graphic\z-buffer\main.c|3|graphics.h: No such file or directory|

mingw32-gcc.exe: compiler: No such file or directory
mingw32-gcc.exe: logging=full command line: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 31 warnings

compiler search directories :c:\MinGW\bin
linker :d:\workingarea\graphic\z_buffer
link library :GRAPGICS.LIB

and GRAPHICS.LIB is already in linker directory!
« Last Edit: August 12, 2010, 04:07:52 pm by liklstar »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How to develop graphic programs using codeblocks?
« Reply #7 on: August 12, 2010, 04:52:31 pm »
Now, I don't think C::B can link Turbo C's non-standard library to the target code unless you  told me how to resolve this trouble!
You're not reading what you've been told to read...
And you still think that C::B is compiler/linker!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: How to develop graphic programs using codeblocks?
« Reply #8 on: August 12, 2010, 05:13:17 pm »
mingw32-gcc.exe: logging=full command line: No such file or directory

The above line implies a level of ignorance too large for me to help.

Bye

Tim S.
PS: I think your new thread will fail without someone to help you on-site
http://forums.codeblocks.org/index.php/topic,13083.0.html
« Last Edit: August 12, 2010, 05:14:52 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline liklstar

  • Single posting newcomer
  • *
  • Posts: 7
Re: How to develop graphic programs using codeblocks?
« Reply #9 on: August 13, 2010, 05:53:39 am »
mingw32-gcc.exe: logging=full command line: No such file or directory

The above line implies a level of ignorance too large for me to help.

Bye

Tim S.
PS: I think your new thread will fail without someone to help you on-site
http://forums.codeblocks.org/index.php/topic,13083.0.html


The following is the detail information, help me please!


-------------- Build: Debug in z-buffer ---------------

mingw32-gcc.exe -Wall -std=c99  -g -std=c99  compiler logging="full command line"   -IC:\MinGW\bin -IC:\MinGW\bin  -c D:\WorkingArea\Graphic\z-buffer\main.c -o obj\Debug\main.o
D:\WorkingArea\Graphic\z-buffer\main.c:3:22: graphics.h: No such file or directory
D:\WorkingArea\Graphic\z-buffer\main.c:61: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `calcabcd':
D:\WorkingArea\Graphic\z-buffer\main.c:77: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:132: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `buildPT':
D:\WorkingArea\Graphic\z-buffer\main.c:150: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:153: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c:162: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `buildET':
D:\WorkingArea\Graphic\z-buffer\main.c:194: warning: implicit declaration of function `getch'
D:\WorkingArea\Graphic\z-buffer\main.c:202: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:249: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `insertedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:273: warning: suggest parentheses around assignment used as truth value
D:\WorkingArea\Graphic\z-buffer\main.c:282: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: In function `findcolor':
D:\WorkingArea\Graphic\z-buffer\main.c:294: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:298: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `deleteedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:321: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:343: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `pairleftedge':
D:\WorkingArea\Graphic\z-buffer\main.c:359: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:362: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `pairrightedge':
D:\WorkingArea\Graphic\z-buffer\main.c:377: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:380: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `deletecurrentedgepair':
D:\WorkingArea\Graphic\z-buffer\main.c:387: warning: `return' with no value, in function returning non-void
D:\WorkingArea\Graphic\z-buffer\main.c:395: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:398: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `setva':
D:\WorkingArea\Graphic\z-buffer\main.c:426: warning: control reaches end of non-void function
D:\WorkingArea\Graphic\z-buffer\main.c: At top level:
D:\WorkingArea\Graphic\z-buffer\main.c:430: warning: return type defaults to `int'
D:\WorkingArea\Graphic\z-buffer\main.c: In function `main':
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: `VGA' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: (Each undeclared identifier is reported only once
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: for each function it appears in.)
D:\WorkingArea\Graphic\z-buffer\main.c:434: error: `VGAHI' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:456:2: warning: "/*" within comment
D:\WorkingArea\Graphic\z-buffer\main.c:463: warning: suggest explicit braces to avoid ambiguous `else'
D:\WorkingArea\Graphic\z-buffer\main.c:483:2: warning: "/*" within comment
D:\WorkingArea\Graphic\z-buffer\main.c:485: warning: implicit declaration of function `registerbgidriver'
D:\WorkingArea\Graphic\z-buffer\main.c:485: error: `EGAVGA_driver' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:486: warning: implicit declaration of function `initgraph'
D:\WorkingArea\Graphic\z-buffer\main.c:487: warning: implicit declaration of function `setbkcolor'
D:\WorkingArea\Graphic\z-buffer\main.c:487: error: `GREEN' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:488: warning: implicit declaration of function `setcolor'
D:\WorkingArea\Graphic\z-buffer\main.c:488: error: `YELLOW' undeclared (first use in this function)
D:\WorkingArea\Graphic\z-buffer\main.c:489: warning: implicit declaration of function `clrscr'
D:\WorkingArea\Graphic\z-buffer\main.c:495: warning: implicit declaration of function `putpixel'
D:\WorkingArea\Graphic\z-buffer\main.c:435: warning: unused variable `p'
D:\WorkingArea\Graphic\z-buffer\main.c:436: warning: unused variable `ep'
D:\WorkingArea\Graphic\z-buffer\main.c:538: warning: statement with no effect
mingw32-gcc.exe: compiler: No such file or directory
mingw32-gcc.exe: logging=full command line: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
8 errors, 36 warnings
 


Offline advance-software

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: How to develop graphic programs using codeblocks?
« Reply #10 on: August 13, 2010, 11:46:14 am »
> How and what should I do if I develop a graphics program?

Learn OpenGL :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: How to develop graphic programs using codeblocks?
« Reply #11 on: August 13, 2010, 05:56:57 pm »
Till you learn how to turn on Full Compiler Logging in Code::Blocks; I think it is a waste of time for you to post more messages on this web-site; Other than questions, on how to turn on Full Compiler Logging.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Tim S.
« Last Edit: August 13, 2010, 06:33:43 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org