Author Topic: [Solved] Blank Project - C or C++? /(Please help me use FLTK.)  (Read 4498 times)

Offline k_squared

  • Single posting newcomer
  • *
  • Posts: 2
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?
« Last Edit: August 29, 2012, 04:51:02 am by k_squared »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9661
Re: Blank Project - C or C++? /(Please help me use FLTK.)
« Reply #1 on: August 28, 2012, 07:42:47 am »
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Blank Project - C or C++? /(Please help me use FLTK.)
« Reply #2 on: August 28, 2012, 07:58:47 am »
And for newly created files, it depends on the file-ending you chose.

Offline k_squared

  • Single posting newcomer
  • *
  • Posts: 2
[Solved] Re: Blank Project - C or C++? /(Please help me use FLTK.)
« Reply #3 on: August 28, 2012, 08:16:14 am »
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.
« Last Edit: August 29, 2012, 12:39:21 am by k_squared »