Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Compiling own library in TheIDE (librarary as an output)
Compiling own library in TheIDE [message #53024] Mon, 10 February 2020 20:59 Go to next message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
Hello.

I have recently decided to switch from Code::Blocks to TheIDE and I am developing a small library. I encountered problems while doing so. There are no templates when creating new project that would be suitable for libraries. I created empty project and I can not find any options to turn its output to a lib (I need both Windows and Linux). It is obviously complaining about a lack of main function. Its been really frustrating and I can not find any solution nowhere on this forum.

edit: I am interested in static libraries.

Lucas.

[Updated on: Mon, 10 February 2020 22:05]

Report message to a moderator

Re: Compiling own library in TheIDE [message #53025 is a reply to message #53024] Tue, 11 February 2020 11:41 Go to previous messageGo to next message
Arvidas is currently offline  Arvidas
Messages: 1
Registered: February 2020
Junior Member
Hi,
I am new in TheIDE, earlier i was using CodeBlocks but it is too bugy.
TheIDE is not intuitive, so i need a few answers.
I'm trying include directories to GLFW 3.3.2 library, and GLEW 2.1.0(i know it is inside TheIDE)
Setup -> Build methods -> INCLUDE directories(.h, .hpp) and -> LIB directories(.lib, .a)
I added in Package organizer link options: -lglfw3 -lgdi32 -lglew32s -lglu32 -lopengl32
but TheIDE can't see files.

Please tell me step by step how to do it right.
Re: Compiling own library in TheIDE [message #53057 is a reply to message #53024] Tue, 18 February 2020 14:43 Go to previous messageGo to next message
nikeshsharma221 is currently offline  nikeshsharma221
Messages: 2
Registered: February 2020
Junior Member

Compiling own library in TheIDE Laughing Laughing
Re: Compiling own library in TheIDE [message #53059 is a reply to message #53024] Tue, 18 February 2020 18:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12697
Registered: November 2005
Ultimate Member
Lucas wrote on Mon, 10 February 2020 20:59
Hello.

I have recently decided to switch from Code::Blocks to TheIDE and I am developing a small library. I encountered problems while doing so. There are no templates when creating new project that would be suitable for libraries. I created empty project and I can not find any options to turn its output to a lib (I need both Windows and Linux). It is obviously complaining about a lack of main function. Its been really frustrating and I can not find any solution nowhere on this forum.

edit: I am interested in static libraries.

Lucas.


That is not really what is theide designed for (U++ is designed around the concept of packages, which are sort of library in source form with metainformation), but as temporary solution:

In release mode, all packages are in fact compiled into static libraries. So I would do this: Make your library a non-main package. Use main package to test the library. While developing, it is irrelevant that the library is not really an library. Then build in release mode and pick those .lib (or .a) files in output tree.


Mirek
Re: Compiling own library in TheIDE [message #53060 is a reply to message #53025] Tue, 18 February 2020 18:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12697
Registered: November 2005
Ultimate Member
Arvidas wrote on Tue, 11 February 2020 11:41
Hi,
I am new in TheIDE, earlier i was using CodeBlocks but it is too bugy.
TheIDE is not intuitive, so i need a few answers.
I'm trying include directories to GLFW 3.3.2 library, and GLEW 2.1.0(i know it is inside TheIDE)
Setup -> Build methods -> INCLUDE directories(.h, .hpp) and -> LIB directories(.lib, .a)
I added in Package organizer link options: -lglfw3 -lgdi32 -lglew32s -lglu32 -lopengl32
but TheIDE can't see files.


Useful for you at this point is Setup/Verbose. If active, it will list complete commandlines while compiling, so that you will know what is going on.

Then it is probably better to add libraries directly as libraries instead of linker options. Load some U++ example, open package organizer and check e.g. the Core package. See how system libs are added...

Also: Check that you have added build method directories to the correct build method (the one you are using to compile).

Mirek
Re: Compiling own library in TheIDE [message #53069 is a reply to message #53060] Wed, 19 February 2020 09:33 Go to previous message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
Works as a charm!

Thank you Mirek.

Lucas.
Previous Topic: PostgreSQL under Windows
Next Topic: Debugging under Linux
Goto Forum:
  


Current Time: Fri Sep 18 13:02:22 CEST 2020

Total time taken to generate the page: 0.01643 seconds