News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[Solved] Blank Project - C or C++? /(Please help me use FLTK.)

Started by k_squared, August 28, 2012, 07:13:58 AM

Previous topic - Next topic

k_squared

I have a FLTK project that obviously needs C++.  I started by creating a blank project in code::blocks.
(I used the binary download of FLTK 1.3.)

So....... Does the code::blocks project default to C or C++?

I am getting an "undefined reference to _Unwind_Resume" error. Research indicates a lot of people say this is a likely symptom of compiling C++ on a C compiler.

Thus, I've noticed whenever I use an invalid filename for the C compiler in the toolchain options, it skips the build.  Whenever I use an invalid filename for the C++ compilier it builds.

I tried to replace the C compiler with the C++ compiler, same error.

I tried to create a c++ console application and just replace that code with the FLTK code, but that crashes ld.exe.   :'(

A thousand Thank Yous to anyone with a solution?

MortenMacFly

1.) Why don't you use the FLTK wizard?
2.) The console project is what you defined it to be: Either C or C++ - you have to do this selection in the wizard.
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]

Jenna

And for newly created files, it depends on the file-ending you chose.

k_squared

Wow, thanks for the fast reply guys. 8)

*EDIT*: Wow..... I must have been tired last night.  Oh I get that second one....
*EDIT2*: Wow, got it working with the codeblocks wizard using the binaries (ver 1.3, the current supported version) from http://code.google.com/p/fltkwinbin/.

I thought I was, wow.  What was *I* thinking!

I saved it as a .CPP.  That should invoke the C++ compilier, right?

The FLTK Wizard first tells me that it cannot find fl.h.  When I change the path so that it CAN find fl.h (it /include/compat/fl) it says it cannot find the include directory.

Was it for a particular version, if you don't mind my asking?  I'll probably be good with any version.

So forgive the stupid question *sigh* how does one get FLTK working?

Thanks Again...

Thanks again, guys.