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 » Community » Newbie corner » Link an object file
Link an object file [message #60499] Mon, 11 March 2024 22:03 Go to next message
Silvan is currently offline  Silvan
Messages: 56
Registered: December 2014
Location: Trento (IT)
Member
Sorry for the silly question but U++ here is quite different from MSVC.

How can I add a source file to my package and link with the corresponding object file?

I tried with package organizer with no success.

Thanks
Re: Link an object file [message #60500 is a reply to message #60499] Mon, 11 March 2024 22:14 Go to previous messageGo to next message
Silvan is currently offline  Silvan
Messages: 56
Registered: December 2014
Location: Trento (IT)
Member
6. Adding Dependent Packages

If a package uses other packages, then they must be "added" to the using package. For example, the HelloWorld package in the "examples" assembly uses the CtrlLib package which you can see in the example package-organizer dialog in the previous section. The CtrlLib package uses the CtrlCore and RichText packages. The package-organizer dialog allows you to add or remove dependent packages and you can also select the order in which the used packages are built. Use mouse right-click in the "uses" pane of the package-organizer dialog to do this. Alternatively you can use "add package" from the Project menu.

That does not help because I don't understand how to add a simple object file of source already added to the package (left hand list).
Re: Link an object file [message #60501 is a reply to message #60499] Mon, 11 March 2024 22:17 Go to previous messageGo to next message
Silvan is currently offline  Silvan
Messages: 56
Registered: December 2014
Location: Trento (IT)
Member
The package organizer allows the setting of a number of things affecting the package build process. The "When" column allows control of when the item in the right hand column is applied. In the above example, the -I compiler option is applied with GCC compiler and /I is applied with the Microsoft (MSC71) compiler.

Target file override. Allows specification of a name for the final executable. The default name is the package name.

Additional libraries. Allows specification of the path and name of object file libs and shared libraries that will be supplied to the linker.


That seems the case: but what directory I should provide if the *.o file is located in different location depending of the compiler selected?
Re: Link an object file [message #60502 is a reply to message #60499] Mon, 11 March 2024 23:01 Go to previous message
Silvan is currently offline  Silvan
Messages: 56
Registered: December 2014
Location: Trento (IT)
Member
Ok it works fine if the source file is *.cpp not with c file.... !!?!
Next Topic: Sub menu in a toolbar?
Goto Forum:
  


Current Time: Sat Jul 13 02:26:56 CEST 2024

Total time taken to generate the page: 0.03097 seconds