News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

How to develop graphic programs using codeblocks?

Started by liklstar, August 12, 2010, 06:23:41 AM

Previous topic - Next topic

liklstar

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!

MortenMacFly

Quote from: liklstar 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?
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

liklstar

Quote from: MortenMacFly on August 12, 2010, 06:39:27 AM
Quote from: liklstar 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?
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?

oBFusCATed

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!]

liklstar

Quote from: oBFusCATed 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...

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!

stahta01

Turn on Full Compiler Logging and maybe you can see your problem or some else can see it.

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

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

liklstar

#6
Quote from: stahta01 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.

QuoteLogging: 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!

oBFusCATed

Quote from: liklstar on August 12, 2010, 03:29:21 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!]

stahta01

#8
Quote from: liklstar on August 12, 2010, 04:01:40 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.next.codeblocks.org/index.php/topic,13083.0.html
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

liklstar

Quote from: stahta01 on August 12, 2010, 05:13:17 PM
Quote from: liklstar on August 12, 2010, 04:01:40 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.next.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



advance-software

> How and what should I do if I develop a graphics program?

Learn OpenGL :)

stahta01

#11
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]