Author Topic: You must select a host application to "run" a library...  (Read 7675 times)

Offline The__Malteser

  • Single posting newcomer
  • *
  • Posts: 4
You must select a host application to "run" a library...
« on: January 03, 2014, 04:58:14 pm »
Hi. I am working with Code::Blocks and trying to program with the C language. I have created a header file, an implementation file and the main. When I compile, I have no errors, but when I run it I get the following error.

You must select a host application to "run" a library...

The libraries are all in the same folder.


I also did include the header files in my main program.


I have tried on 2 different PCs, and it didn't work. i tried with a different piece of code and it worked flawlessly.

What should I do?

Thanks.
« Last Edit: January 03, 2014, 05:05:19 pm by The__Malteser »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: You must select a host application to "run" a library...
« Reply #1 on: January 03, 2014, 05:04:50 pm »
I guess you used the template for a (shared|static) library.
Go to "Project -> Properties -> Build targets" and make sure the build type for the appropriate target is gui or console application.

Offline The__Malteser

  • Single posting newcomer
  • *
  • Posts: 4
Re: You must select a host application to "run" a library...
« Reply #2 on: January 03, 2014, 05:10:01 pm »
Solved. Cheers.